ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
|
| 21 Jul 2011 10:38 PM |
My tool commands for script builder aren't working D: I'm not sure what's wrong with my script.
admin = {"ShoeBox4", "DoogleFox", "BuildBuilder"} looped = false
function Chat(msg, speaker)
if string.sub(msg, 1, 4) == "kill" then num = string.sub(msg, 6) num = string.lower(num) for i, v in pairs(game.Players:children()) do if string.find(string.lower(v.Name), num) then if v.Character ~= nil then v.Character:BreakJoints() end end end end
if string.sub(msg, 1, 4) == "kick" then num = string.sub(msg, 6) num = string.lower(num) for i, v in pairs(game.Players:children()) do if string.find(string.lower(v.Name), num) then v:remove() end end end
if string.sub(msg, 1, 8) == "loopkill" then num = string.sub(msg, 10) num = string.lower(num) for i, v in pairs(game.Players:children()) do if string.find(string.lower(v.Name), num) then looped = true for i = 1, 100 do if v.Character ~= nil then if looped == true then v.Character:BreakJoints() else break end end wait(3) end end end end
if string.sub(msg, 1, 10) == "unloopkill" then num = string.sub(msg, 12) num = string.lower(num) for i, v in pairs(game.Players:children()) do if string.find(string.lower(v.Name), num) then looped = false end end end
if string.sub(msg, 1, 3) == "msg" then num = string.sub(msg, 5) m = Instance.new("Message", workspace) m.Name = "Msg" m.Text = speaker.Name..": "..num game:GetService("Debris"):AddItem(m, 3) end
if string.sub(msg, 1, 4) == "hint" then num = string.sub(msg, 6) h = Instance.new("Hint", workspace) h.Name = "Msg" h.Text = speaker.Name..": "..num game:GetService("Debris"):AddItem(h, 3) end
if string.sub(msg, 1, 6) == "freeze" then num = string.sub(msg, 8) num = string.lower(num) for i, v in pairs(game.Players:children()) do if string.find(string.lower(v.Name), num) then for _, vv in pairs(v.Character:children()) do if vv.className == "Part" then vv.Anchored = true end end end end end
if string.sub(msg, 1, 8) == "unfreeze" then num = string.sub(msg, 10) num = string.lower(num) for i, v in pairs(game.Players:children()) do if string.find(string.lower(v.Name), num) then for _, vv in pairs(v.Character:children()) do if vv.className == "Part" then vv.Anchored = false end end end end end
if string.sub(msg, 1, 7) == "duckhat" then num = string.sub(msg, 9) num = string.lower(num) for i, v in pairs(game.Players:children()) do if string.find(string.lower(v.Name), num) then Hat = v.Character:children() for i = 1,#Hat do if Hat[i]:IsA("Hat") then Hat[i]:Remove() wait() end end g = game:GetService("InsertService"):LoadAsset(9254254) g.Parent = v.Character g:MoveTo(v.Character.Head.Position) end end end
if string.sub(msg, 1, 8) == "dinomask" then num = string.sub(msg, 10) num = string.lower(num) for i, v in pairs(game.Players:children()) do if string.find(string.lower(v.Name), num) then Hat = v.Character:children() for i = 1,#Hat do if Hat[i]:IsA("Hat") then Hat[i]:Remove() wait() end end g = game:GetService("InsertService"):LoadAsset(51242846) g.Parent = v.Character g:MoveTo(v.Character.Head.Position) end end end
if string.sub(msg, 1, 8) == "gravcoil" then num = string.sub(msg, 10) num = string.lower(num) for i, v in pairs(game.Players:children()) do if string.find(string.lower(v.Name), num) then g = game:GetService("InsertService"):LoadAsset(16688968) g.Parent = game.Workspace g:MoveTo(v.Backpack) end end end
if string.sub(msg, 1, 7) == "gravgun" then num = string.sub(msg, 9) num = string.lower(num) for i, v in pairs(game.Players:children()) do if string.find(string.lower(v.Name), num) then g = game:GetService("InsertService"):LoadAsset(34901961) g.Parent = game.Workspace g:MoveTo(v.Backpack) end end end
end
----- Connections ------
for i, v in pairs(game.Players:children()) do for _, vv in pairs(admin) do if v.Name == vv and v.className == "Player" then v.Chatted:connect(function(msg) Chat(msg, v) end) end end end
---- On Enter Connect ----
game.Players.ChildAdded:connect(function(player) if player.className == "Player" then for i, v in pairs(admin) do if player.Name == v then v.Chatted:connect(function(msg) Chat(msg, player) end) end end end end)
Is there anything wrong? |
|
|
| Report Abuse |
|
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
|
| 21 Jul 2011 10:39 PM |
I'm sorry I didn't mean to post the whole script. Here's the tool commands part.
if string.sub(msg, 1, 8) == "gravcoil" then num = string.sub(msg, 10) num = string.lower(num) for i, v in pairs(game.Players:children()) do if string.find(string.lower(v.Name), num) then g = game:GetService("InsertService"):LoadAsset(16688968) g.Parent = game.Workspace g:MoveTo(v.Backpack) end end end
if string.sub(msg, 1, 7) == "gravgun" then num = string.sub(msg, 9) num = string.lower(num) for i, v in pairs(game.Players:children()) do if string.find(string.lower(v.Name), num) then g = game:GetService("InsertService"):LoadAsset(34901961) g.Parent = game.Workspace g:MoveTo(v.Backpack) end end end
|
|
|
| Report Abuse |
|
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
|
| 21 Jul 2011 10:53 PM |
| OMG DO YOU SEE WHAT I MEAN?!?!?! NOBODY EVER ANSWERS!!!!!!! |
|
|
| Report Abuse |
|
|
| |
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
|
| 21 Jul 2011 10:56 PM |
| LOL!!!!!!! I made this with the help of DoogleFox and BuildBuilder! If you want proof, PM me and I'll give you the link to the site I created it at. And you can also ask DoogleFox. Me and DoogleFox made this from scratch. Free models much... LOL |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2011 11:03 PM |
| Can't take a joke much? =3 try them apples! Lol XD. |
|
|
| Report Abuse |
|
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
|
| 21 Jul 2011 11:05 PM |
| I find funny how you actually said that you wrote it, and you don't even use output... |
|
|
| Report Abuse |
|
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
|
| 21 Jul 2011 11:05 PM |
| -.- If you're not gonna help, don't post at all... |
|
|
| Report Abuse |
|
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
| |
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
|
| 21 Jul 2011 11:14 PM |
| What's the point in putting output if you're not gonna help? |
|
|
| Report Abuse |
|
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
|
| 21 Jul 2011 11:17 PM |
| Because no one feel like going through 100+ lines of code without any hint of what the problem can be :D |
|
|
| Report Abuse |
|
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
|
| 21 Jul 2011 11:18 PM |
| Read my second post. There isn't any output. The tools aren't showing up in my backpack. |
|
|
| Report Abuse |
|
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
|
| 21 Jul 2011 11:21 PM |
| *Facepalm* I just read those lines... you don't have idea of what the MoveTo() method is for, do you? |
|
|
| Report Abuse |
|
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
|
| 21 Jul 2011 11:25 PM |
| MoveTo can be used with Vector3 values or to do something like MoveTo(v.Character.Head.Position) :) |
|
|
| Report Abuse |
|
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
|
| 21 Jul 2011 11:26 PM |
| Oh, I see whta you mean. I'm not moving it to a position. Ok. |
|
|
| Report Abuse |
|
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
|
| 21 Jul 2011 11:32 PM |
| So, how would I put it into my backpack? |
|
|
| Report Abuse |
|
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
|
| 21 Jul 2011 11:35 PM |
g = game:GetService("InsertService"):LoadAsset(16688968) g.Parent = v.Backpack |
|
|
| Report Abuse |
|
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
| |
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
| |
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
|
| 22 Jul 2011 02:23 PM |
| Wow, 367 views and 18 replies... Fail |
|
|
| Report Abuse |
|
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
|
| 22 Jul 2011 02:39 PM |
Uhm, I got some new output...
Fri Jul 22 12:36:41 2011 - Remote Url:1: bad argument #1 to 'sub' (string expected, got nil) Fri Jul 22 12:36:41 2011 - Script "Remote Url", Line 1 Fri Jul 22 12:36:41 2011 - stack end
I got that when I only ran gravcoil. So that line would be if string.sub(msg, 1, 8) == "gravcoil" then
I don't know what's wrong with it :I |
|
|
| Report Abuse |
|
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
| |
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
| |
|
alvicate
|
  |
| Joined: 06 Dec 2008 |
| Total Posts: 79 |
|
|
| 22 Jul 2011 03:47 PM |
Yes me : Yesterday i ate an apple . I hope it helped :3 . |
|
|
| Report Abuse |
|
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
|
| 22 Jul 2011 06:17 PM |
| Don't post if you're not gonna help. Thanks. |
|
|
| Report Abuse |
|
|