2DWorlds Forums
How would I make a Item giver? - Printable Version

+- 2DWorlds Forums (http://2dworlds.buildism.net/forum)
+-- Forum: 2DWorlds (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=4)
+--- Forum: Scripting (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=13)
+--- Thread: How would I make a Item giver? (/showthread.php?tid=2875)



How would I make a Item giver? - broloxer - 04-11-2011

How would I make a item giver?


RE: How would I make a Item giver? - Scripter - 04-11-2011

Put your tool in Environment

[lua]
local jet = game.Environment.JetBoots:clone() --Tool name switched with JetBoots
local debounce = true
function touch(hit)
if game.Players:getChild(hit.Parent.Name)~=nil and debounce then
debounce = false
local clone = jet:clone()
clone.Parent = game.Players[hit.Parent.Name].Inventory
sleep(2)
debounce = true
end
end
link(script.Parent.Collided, touch)
[/lua]