View difference between Paste ID: VGCDVFnt and 7E3hReuN
SHOW: | | - or go back to the newest paste.
1
-- command script, this only supports commands that don't affect a player, or have a value needed
2
3
local admins = {
4-
	["PlayerName"] = true  -- do not put your name here, it gets automatically done
4+
	["R0bustic"] = true  -- do not put your name here, it gets automatically done
5
}
6
local prefix = ":/"
7
8
game.Players.PlayerAdded:connect(function(p)
9
	if admins[p.Name] or p.UserId == game.OwnerId then
10
		p.Chatted:connect(function(msg)
11
			local leng = prefix:len()
12
			if msg:sub(1,leng) == prefix then
13
				local c = msg:sub(leng + 1):lower()
14
				if c == "killall" then -- make your commands all lowercase
15
					-- this is your code v
16
					local a = game.Players:GetChildren()
17
					for _,v in pairs (a) do
18
						if a.Character then
19
							a.Character:BreakJoints()
20
						end
21
					end
22
					-- this is your code ^
23
				end
24
				if c == "reset" then
25
					if p.Character then
26
						p.Character:BreakJoints()
27
					end
28
				end
29
			end
30
		end)
31
	end
32
end)