|
| 16 Sep 2012 04:25 PM |
| I need a script that hides from workspace and can shutdown a server by only my command. Anyone know how to accomplish such a task? |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2012 04:35 PM |
make the script parent itself to nil, make a chatted event that crashes/bans everyone upon your command.
¬ Scripter Tier-2, LuaLearners Elite ♣ scripting teacher/freelance worker ♣ send me trade requests! |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2012 04:40 PM |
| Is changing the parent of the script what makes it invisible? |
|
|
| Report Abuse |
|
|
ToonU
|
  |
| Joined: 15 Aug 2011 |
| Total Posts: 6303 |
|
|
| 16 Sep 2012 04:47 PM |
Here, I'll give you the shutdown script.
name = "YOUR NAME HERE" function onChatted(msg, recipient, speaker) if speaker == nil then return end if speaker.Character == nil then return end local source = string.lower(speaker.Name) msg = string.lower(msg) if (msg == "/shutdown") then if speaker.Name == name then game:remove() --I could not think of the event that shuts it down though.. end end end function onPlayerEntered(newPlayer) newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end) end game.Players.ChildAdded:connect(onPlayerEntered)
--[[Kevin]]-- |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2012 04:50 PM |
assuming this is in a script builder, someone could easily remove the script.
and you can't exactly destroy game... there's a plethora of problems with that script.
and yes, parenting it to nil is the part that protects it.
¬ Scripter Tier-2, LuaLearners Elite ♣ scripting teacher/freelance worker ♣ send me trade requests! |
|
|
| Report Abuse |
|
|
ToonU
|
  |
| Joined: 15 Aug 2011 |
| Total Posts: 6303 |
|
|
| 16 Sep 2012 04:51 PM |
Aw, what's wrong with my script?
--[[Kevin]]-- |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2012 04:55 PM |
it's pretty inefficient.
admin = "doombringer42"
game.Players.PlayerAdded:connect(function(newPlayer) -- anonymous functions are neater, and also PlayerAdded is safer than ChildAdded for this situation
if newPlayer.Name == admin then -- check if admin BEFORE connecting newPlayer.Chatted:connect(function(msg) -- again, anonymous functions are neater
if msg:lower() == "/shutdown" then -- lowercase -- crash game end
end) end end)
¬ Scripter Tier-2, LuaLearners Elite ♣ scripting teacher/freelance worker ♣ send me trade requests! |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2012 05:16 PM |
How to Crash a Server:
1] while true do end
2] Instance.new("ManualSurfaceJointInstance",workspace)
3]
ply = game.Players["Noob"] ply.Character = workspace wait() ply:Destroy()
*Not sure if #3 still works |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2012 05:33 PM |
manualsurfacejointinstance was fixed.
¬ Scripter Tier-2, LuaLearners Elite ♣ scripting teacher/freelance worker ♣ send me trade requests! |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2012 07:26 PM |
| These are all exelent guys, realy. But How can you make it that when some one acesses studio mode, they cant find the script that shutsdown the servers .w. ? |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2012 07:41 PM |
if they open studio by force, then a). the script won't appear since global scripts aren't replicated to the client b). the script still wouldn't appear since it is parented to nil
¬ Scripter Tier-2, LuaLearners Elite ♣ scripting teacher/freelance worker ♣ send me trade requests! |
|
|
| Report Abuse |
|
|
|
| 17 Sep 2012 10:04 AM |
Exelent...
Thanks for the help |
|
|
| Report Abuse |
|
|