Advertisement
LPGhatguy

Script for tyridge77@ROBLOX

Jan 28th, 2012
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.91 KB | None | 0 0
  1. local Enabled = true
  2.  
  3. local CooldownTime = 600
  4. local Object = script.Parent.Holkrath:Clone()
  5. local Requires = "Pickaxe"
  6.  
  7. function ToggleEnabled()
  8.     Enabled = not Enabled
  9.    
  10.     if (Enabled) then
  11.         --Replace this with stuff that makes sure the model
  12.         --is visible, and able to be touched.
  13.         script.Parent.Transparency = 0
  14.         script.Parent.CanCollide = true
  15.     else
  16.         --Replace this with stuff that makes the model
  17.         --invisible, and non-cancollide
  18.         script.Parent.Transparency = 1
  19.         script.Parent.CanCollide = false
  20.     end
  21. end
  22.  
  23. script.Parent.Touched:connect(function(Hit)
  24.     local Parent = Hit.Parent
  25.     if (Parent and Parent:FindFirstChild("Humanoid")) then
  26.         local Player = game.Players:GetPlayerFromCharacter(Parent)
  27.         if (Player and Enabled and Player.Backpack:FindFirstChild(Requires)) then
  28.             Object:Clone().Parent = Player.Backpack
  29.             ToggleEnabled()
  30.             wait(CooldownTime)
  31.             ToggleEnabled()
  32.         end
  33.     end
  34. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement