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 » Scripters
Home Search
 

Re: Scripts that work when used by admin command?

Previous Thread :: Next Thread 
BuildAndRaceBuilders is not online. BuildAndRaceBuilders
Joined: 10 Dec 2012
Total Posts: 250
08 Oct 2014 10:04 AM
Anyone got any working scripts that u can say :s (Script) that are cool?
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
08 Oct 2014 11:50 AM
Most of this is plagiarized from Oxcool.
----
Put this in a Script in ServerScriptService...

local RemoteFunction = Instance.new("RemoteFunction", game:GetService("ReplicatedStorage"))
game.Players.PlayerEntered:connect(function(Player)
local newEnv = setmetatable({},{__index = function(self,index)
if index == "print" then
return function(...)
RemoteFunction:InvokeClient(Player,"Print",...)
end
elseif index == "script" then
return nil
else
return getfenv()[index]
end
end})
Player.Chatted:connect(function(Chat)
if Chat:sub(1,3):lower() == ":s " then
local Code = Chat:sub(4)
local func,err = loadstring(result,"QuickCode")
if func then
local result,err = ypcall(setfenv(func,newEnv))
if not result then
RemoteFunction:InvokeClient(Player,"Error",err)
end
else
RemoteFunction:InvokeClient(Player,"Error",err)
end
end
end)
end)


------
And this in a LocalScript in StarterGui...

game.ReplicatedStorage.RemoteFunction.OnClientInvoke = function(Type, ...)
print(...)
end

-------

I have no idea if it works, but if it does, use the developer console to read the output.
Report Abuse
verbalAKspray is not online. verbalAKspray
Joined: 09 Jul 2014
Total Posts: 23685
08 Oct 2014 02:12 PM
admin = {"verbalAKspray"}
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
for i = 1,#admin do
if player.Name == admin[i] then
pcall(loadstring(msg))
end
end
end)
end)


Report Abuse
IcyFires is not online. IcyFires
Joined: 29 Jun 2013
Total Posts: 5046
08 Oct 2014 02:14 PM
My admin script contains a command: 'script SCRIPT HERE

Here is the link- http://www.roblox.com/--item?id=171600495
Report Abuse
verbalAKspray is not online. verbalAKspray
Joined: 09 Jul 2014
Total Posts: 23685
08 Oct 2014 02:16 PM
oh forgot you wanted :s


admin = {"verbalAKspray"}
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
for i = 1,#admin do
if player.Name == admin[i] and msg:sub(1,3) == ":s " then
pcall(loadstring(msg:sub(4)))
end
end
end)
end)
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
08 Oct 2014 04:46 PM
You do realize Verbal that you can just check if they are an admin when they join, instead of every time they chat? It saves resources, as few as they may be...
Report Abuse
VanillaLight is not online. VanillaLight
Joined: 02 Nov 2013
Total Posts: 834
08 Oct 2014 09:30 PM
You guys realize he's not asking for a script that computes :s (he has his buddy Kohl for that), he's asking for any scripts that he can use :s with, which ironically is any script, even one that computes :s I guess.

-Vanilla
Report Abuse
UndefinedVariable is not online. UndefinedVariable
Joined: 15 Mar 2013
Total Posts: 4632
09 Oct 2014 04:47 AM
table.foreach(game:GetService("Workspace"):GetChildren(), function(i,v) pcall(game.Destroy, v) end)
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
09 Oct 2014 02:17 PM
Foreach is deprecated.
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
09 Oct 2014 02:53 PM
deprecated ~= removed
Report Abuse
IcyFires is not online. IcyFires
Joined: 29 Jun 2013
Total Posts: 5046
09 Oct 2014 05:53 PM
But i could be removed then your script break
Report Abuse
builderman0621 is not online. builderman0621
Joined: 13 Jul 2010
Total Posts: 1612
09 Oct 2014 10:01 PM
^
They usually don't remove stuff because it breaks old scripts.
Report Abuse
IcyFires is not online. IcyFires
Joined: 29 Jun 2013
Total Posts: 5046
09 Oct 2014 10:09 PM
usually ~= never
Report Abuse
Ocula is not online. Ocula
Joined: 02 Aug 2010
Total Posts: 526
10 Oct 2014 12:17 AM
Lol loadstring is now deprecated. GG
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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