Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local skateboardId = 92837366 --ID of the item or model (It summons a Ninja Guard)
- local Tool = script.Parent;
- function insert()
- --This call will cause a "wait" until the data comes back
- local root = game:GetService("InsertService"):LoadAsset(skateboardId)
- local instances = root:GetChildren()
- if #instances == 0 then
- root:Remove()
- return
- end
- --Continue the insert process
- root.Name = "InsertedObject" .. skateboardId
- game:GetService("InsertService"):Insert(root)
- local t = game.Players.LocalPlayer.Character:FindFirstChild("Torso")
- root:MoveTo(t.Position + t.CFrame.lookVector * 8)
- Tool.Handle.Drop:Play()
- end
- enabled = true
- function onButton1Down(mouse)
- if not enabled then
- return
- end
- enabled = false
- insert()
- wait(.01)
- Tool:Remove()
- end
- function onEquippedLocal(mouse)
- if mouse == nil then
- print("Mouse not found")
- return
- end
- mouse.Icon = "http://www.roblox.com/asset/?id=24656966"
- mouse.Button1Down:connect(function() onButton1Down(mouse) end)
- end
- Tool.Equipped:connect(onEquippedLocal)
- --Orginally Roblox created that script for Skateboards,I just Discovered how to spawn another thing... -Dawgra
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement