Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enabled = 0
- val = 0
- function onTouched(part)
- local h = part.Parent:findFirstChild("Humanoid")
- if (h ~=nil) then
- if (enabled == 0) then
- enabled = 1
- val = val+0.1
- script.Parent.Transparency = val
- script.Parent.CanCollide = true
- wait(.1)
- val = val+0.1
- script.Parent.Transparency = 0.1+val
- script.Parent.CanCollide = true
- wait(.1)
- val = val+0.1
- script.Parent.Transparency = 0.1+val
- script.Parent.CanCollide = true
- wait(.1)
- val = val+0.1
- script.Parent.Transparency = 0.1+val
- script.Parent.CanCollide = true
- wait(.1)
- val = val+0.1
- script.Parent.Transparency = 0.1+val
- script.Parent.CanCollide = true
- wait(.1)
- val = val+0.1
- script.Parent.Transparency = 0.1+val
- script.Parent.CanCollide = true
- wait(.1)
- val = val+0.1
- script.Parent.Transparency = 0.1+val
- script.Parent.CanCollide = true
- wait(.1)
- val = val+0.1
- script.Parent.Transparency = 0.1+val
- script.Parent.CanCollide = true
- wait(.1)
- val = val+0.1
- script.Parent.Transparency = 0.1+val
- script.Parent.CanCollide = true
- wait(.1)
- script.Parent.Transparency = 1
- script.Parent.CanCollide = false
- wait(2)
- val = 0
- enabled = 0
- script.Parent.Transparency = 0
- script.Parent.CanCollide = true
- end
- end
- end
- script.Parent.Touched:connect(onTouched)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement