Haxer4321
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 11 |
|
|
| 08 Mar 2015 08:21 PM |
local part = Instance.new("Part",workspace) part.Shape = "Cylinder" part.Size = Vector3.new(1,1,1) part.TopSurface = "Smooth" part.BottomSurface = "Smooth" local bpos = Instance.new("BodyPosition",part) bpos.maxForce = Vector3.new(math.huge,math.huge,math.huge) local name = "Haxer4321" while wait() do if workspace:FindFirstChild(name) and workspace[name]:FindFirstChild("Torso") then bpos.position = workspace[name].Torso.Position end end
function detectcommand(msg, command) if msg:sub(1,string.len(command)) == command then return true else return false end end
game.Players.Haxer4321.Chatted:connect(function(msg) msg = msg:lower() --[[ this makes the command non-case-sensitive ]] if detectcommand(msg, "#kill ") then --[[ if it detects a "#kill " command ]] for _,v in pairs(game.Players:GetChildren()) do --[[ gather all the players in the game ]] if string.find(msg, v.Name:lower()) then --[[ if we find the name of player in the chat, then v is the player ]] if v.Character ~= nil then --[[ make sure his character exists ]] v.Character:BreakJoints() --[[ break the character ]] end end end end end)
function detectcommand(msg, command) if msg:sub(1,string.len(command)) == command then return true else return false end end
game.Players.Haxer4321.Chatted:connect(function(msg) msg = msg:lower() if detectcommand(msg, "#ban ") then for _,v in pairs (game.Players:GetChildren()) do if string.find(msg, v.Name:lower()) then if v.Character ~= nil then v.Character:destroy() end end end end end) |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 08:22 PM |
1. im not fixing a free model 2. gee i wond- "game.Players.Haxer4321.Chatted:connect(function(msg)" |
|
|
| Report Abuse |
|
|
Haxer4321
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 11 |
|
|
| 08 Mar 2015 08:23 PM |
| Free model? Nice try kiddo, I just spent 30 minutes scripting this for a script builder, don't come here and automatically say "Free model" |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 08:24 PM |
| note that you say "fix please" and don't even provide any output or any description of the problem and the code isn't indented |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 08:24 PM |
"while wait() do" Oh, that could be a problem. The rest of the script won't run while there is a loop going on. |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 08:25 PM |
but yes i am SURE this isn't a free model
that explains the conveniently placed comments |
|
|
| Report Abuse |
|
|