Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Enabled = true
- local CooldownTime = 600
- local Object = script.Parent.Holkrath:Clone()
- local Requires = "Pickaxe"
- function ToggleEnabled()
- Enabled = not Enabled
- if (Enabled) then
- --Replace this with stuff that makes sure the model
- --is visible, and able to be touched.
- script.Parent.Transparency = 0
- script.Parent.CanCollide = true
- else
- --Replace this with stuff that makes the model
- --invisible, and non-cancollide
- script.Parent.Transparency = 1
- script.Parent.CanCollide = false
- end
- end
- script.Parent.Touched:connect(function(Hit)
- local Parent = Hit.Parent
- if (Parent and Parent:FindFirstChild("Humanoid")) then
- local Player = game.Players:GetPlayerFromCharacter(Parent)
- if (Player and Enabled and Player.Backpack:FindFirstChild(Requires)) then
- Object:Clone().Parent = Player.Backpack
- ToggleEnabled()
- wait(CooldownTime)
- ToggleEnabled()
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement