Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- maxtorn = 5 -- Max ammount of tornados
- torn = 1
- if script.Parent.className ~= "HopperBin" then
- local H = Instance.new("HopperBin")
- H.Parent = game:service("Players").Player1.Backpack
- H.Name = "Tornado"
- script.Parent = H
- end
- debounce = false
- plr=game.Players.Player1
- sp=script.Parent
- Mouse = plr:GetMouse()
- tab = {}
- debris = game:GetService("Debris")
- function createtorn()
- local hitta = Mouse.Hit
- for size = 1, 10, 0.2 do
- local z = Instance.new("Part")
- local new=z:Clone()
- new.Parent = game.Workspace
- new.Anchored = true
- new.Size = Vector3.new(size,0,size)
- new.CFrame = CFrame.new(hitta.p.X, hitta.p.Y + size, hitta.p.Z) * CFrame.Angles(0,size,0)
- table.insert(tab, new)
- wait()
- end
- end
- function cleanup()
- for i,v in pairs(tab) do
- debris:AddItem(v,1)
- end
- end
- function Clicked(Mouse)
- if debounce == true then return end
- debounce = true
- createtorn()
- if torn >= maxtorn then
- cleanup()
- torn = 1
- elseif torn < maxtorn then
- torn = torn +1
- print(torn)
- end
- wait()
- debounce = false
- end
- function onKeyDown(key)
- end
- function Selected(Mouse)
- Mouse.KeyDown:connect(onKeyDown)
- Mouse.Button1Down:connect(function()Clicked(Mouse)end)
- end
- function Deselected(Mouse)
- end
- sp.Selected:connect(Selected)
- sp.Deselected:connect(Deselected)
Add Comment
Please, Sign In to add comment