generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: How could I make everyone able to run scripts with chat?

Previous Thread :: Next Thread 
complexo is not online. complexo
Joined: 07 Jan 2009
Total Posts: 1547
22 Nov 2013 09:51 PM
Like the script import exploit, except it's enabled on everyone by default.
I'm curious as to what would happen.
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
22 Nov 2013 09:53 PM
player.Chatted:connect(function(msg, recp) loadstring(msg)() end)
Report Abuse
complexo is not online. complexo
Joined: 07 Jan 2009
Total Posts: 1547
22 Nov 2013 10:05 PM
Nice response time!
I'm guessing I stick this in workspace?
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
22 Nov 2013 10:12 PM
Yes. Except it doesnt quite work :3

game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg, recp) loadstring(msg)() end) end)

Thats the very basic code. If you want more, i suggest coroutines or cloning a script that has this code (like Kohl's admin code)
Report Abuse
domorox17 is not online. domorox17
Joined: 06 Mar 2012
Total Posts: 1710
22 Nov 2013 11:02 PM
or mebbe inserting the script builder script?
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
22 Nov 2013 11:04 PM
This script won't break if the message isn't a script.

Game.Players.PlayerAdded:connect(function(Player)
Player.Chatted:connect(Message)
local Func = loadstring(Message)
if Func then
Func()
end
end)
end)
Report Abuse
complexo is not online. complexo
Joined: 07 Jan 2009
Total Posts: 1547
22 Nov 2013 11:46 PM
Still can't get this working properly.
I checked out Kohl's Admin Commands, and this is the code that I'll need from it, but I'm not sure how to get it working.

local prefix = ":"

if msg:lower():sub(1,2) == "s " then
coroutine.resume(coroutine.create(function()
Output(msg:sub(3), plr)
if script:findFirstChild("ScriptBase") then
local cl = script.ScriptBase:Clone() cl.Code.Value = msg:sub(3)
table.insert(objects, cl) cl.Parent = game.Workspace cl.Disabled = false
else loadstring(msg:sub(3))()
end
end))
end

if msg:lower():sub(1,3) == "ls " then
coroutine.resume(coroutine.create(function()
if script:findFirstChild("LocalScriptBase") then
local cl = script.LocalScriptBase:Clone() cl.Code.Value = msg:sub(4)
table.insert(objects, cl) cl.Parent = plr.PlayerGui cl.Disabled = false Output(msg:sub(4), plr)
end
end))
end

if msg:lower():sub(1,6) == "lsplr " then
local chk1 = msg:lower():sub(7):find(" ") + 6
local plrz = GetPlr(plr, msg:lower():sub(7,chk1-1))
for i, v in pairs(plrz) do
coroutine.resume(coroutine.create(function()
if v and v:findFirstChild("PlayerGui") then
if script:findFirstChild("LocalScriptBase") then
local cl = script.LocalScriptBase:Clone() cl.Code.Value = msg:sub(chk+1)
table.insert(objects, cl) cl.Parent = v.PlayerGui cl.Disabled = false Output(msg:sub(4), plr)
end
end
end))
end
end
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
23 Nov 2013 12:24 AM
Its not that code thats particularly useful. Simply put, that entire code makes a clone of ScriptBase or LocalScriptBase, and Both of them have a child named "Code", a StringValue. It basically sets the value of Code to equal whatever comes after :s, :ls, etc.


What you want is the code inside the ScriptBase and localScriptBase. its quite simple actually

repeat wait() until script:findFirstChild("Code")

loadstring(script.Code.Value)()

But i like the approach of cloning this script every time. Thats why I recommended this way, so that you can have multiple scripts running at once.
Report Abuse
complexo is not online. complexo
Joined: 07 Jan 2009
Total Posts: 1547
23 Nov 2013 12:59 AM
But I don't know how to set it up.
Report Abuse
complexo is not online. complexo
Joined: 07 Jan 2009
Total Posts: 1547
23 Nov 2013 02:05 PM
Bump.
So close, don't fail me now Roblox forums!
Report Abuse
complexo is not online. complexo
Joined: 07 Jan 2009
Total Posts: 1547
23 Nov 2013 03:27 PM
Bump again.
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
23 Nov 2013 04:07 PM
Have a script like this

repeat wait() until script:findFirstChild("Code")

loadstring(script.Code.Value)()

Name it something, like ChatScriptBase or something.

Then I'd use not's code

Game.Players.PlayerAdded:connect(function(Player)
Player.Chatted:connect(Message)
local Func = loadstring(Message)
if Func then
local news = ChatScriptBase:clone()
news.Parent = game.Workspace
news.Code.Value = Message
news.Disabled = false
end
end)
end)


Perhaps
Report Abuse
complexo is not online. complexo
Joined: 07 Jan 2009
Total Posts: 1547
23 Nov 2013 04:23 PM
Well, I would like to be able to have multiple scripts and the three different types of script that Kohl's admin allows.
Report Abuse
complexo is not online. complexo
Joined: 07 Jan 2009
Total Posts: 1547
23 Nov 2013 04:32 PM
I've used some of those script exploits before and they work flawlessly until they get patched. I'm trying to find the bit that actually runs the scripts and enable it on all players by default.
Report Abuse
R8N is not online. R8N
Joined: 07 Aug 2013
Total Posts: 1164
23 Nov 2013 04:38 PM
lololol
Report Abuse
complexo is not online. complexo
Joined: 07 Jan 2009
Total Posts: 1547
23 Nov 2013 05:12 PM
I found http://www.roblox.com/Script-Injector-item?id=135012385
but I can't figure out how to use it.
Report Abuse
complexo is not online. complexo
Joined: 07 Jan 2009
Total Posts: 1547
23 Nov 2013 05:12 PM
Oh, I should add I have that thing I linked to active on here:
http://www.roblox.com/Freescripting-place?id=86642319
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
23 Nov 2013 05:13 PM
Why don't you use the one I posted?
Report Abuse
complexo is not online. complexo
Joined: 07 Jan 2009
Total Posts: 1547
23 Nov 2013 06:12 PM
Didn't work properly.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image