Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Admin script made by spicychilly2
- -- when this script is ran everyone who joins will get admin
- -- use commands: !speed (amount) and !reset and !kickmyself
- local prefix = "!" -- this is the prefix
- game.Players.PlayerAdded:Connect(function(plr) -- Fires when someone joins the game
- plr.Chatted:connect(function(msg) -- Fires if player that joined has chatted
- if string.match(msg, prefix) then -- if player's message has the prefix in it this will fire
- if string.match(msg, prefix.."speed") then -- fires if player is trying to do the !speed command
- local amount = tonumber(msg:sub(string.len(prefix.."speed") + 2)) -- gets the amount of speed that hat player added in the command
- plr.Character.Humanoid.WalkSpeed = amount -- setting player's walkspeed to the amount they chose
- print("Set "..plr.Name.."'s speed to "..amount..".")
- end
- if string.match(msg, prefix.."reset") then
- plr.Character.Humanoid.Health = 0
- end
- if string.match(msg, prefix.."kickmyself") then
- plr:Kick("You kicked yurself!")
- end
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement