Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local debounce = true
- local debounce2 = true
- local debounce3 = true
- local debounce4 = true
- local lava1 = script.Parent.Lava1
- local lava2 = script.Parent.Lava2
- local lava3 = script.Parent.Lava3
- local lava4 = script.Parent.Lava4
- function onTouched(hit)
- if hit.Parent:findFirstChild("Humanoid")and debounce then
- debounce =false
- hit.Parent.Humanoid:TakeDamage(25)
- wait(1)
- debounce = true
- end
- end
- lava1.Touched:connect(onTouched)
- function onTouched2(hit)
- if hit.Parent:findFirstChild("Humanoid")and debounce2 then
- debounce2 =false
- hit.Parent.Humanoid:TakeDamage(25)
- wait(1)
- debounce2 = true
- end
- end
- lava2.Touched:connect(onTouched2)
- function onTouched3(hit)
- if hit.Parent:findFirstChild("Humanoid")and debounce3 then
- debounce3 =false
- hit.Parent.Humanoid:TakeDamage(25)
- wait(1)
- debounce3 = true
- end
- end
- lava3.Touched:connect(onTouched3)
- function onTouched4(hit)
- if hit.Parent:findFirstChild("Humanoid")and debounce4 then
- debounce4 =false
- hit.Parent.Humanoid:TakeDamage(25)
- wait(1)
- debounce4 = true
- end
- end
- lava4.Touched:connect(onTouched4)
- local TweenService = game:GetService("TweenService")
- local tweenInfo = TweenInfo.new(
- 2, -- Time
- Enum.EasingStyle.Bounce, -- EasingStyle
- Enum.EasingDirection.InOut, -- EasingDirection
- -1, -- RepeatCount (when less than zero the tween will loop indefinitely)
- true, -- Reverses (tween will reverse once reaching it's goal)
- 0 -- DelayTime
- )
- local tween = TweenService:Create(lava1, tweenInfo, {Position = Vector3.new(752.156, 716.589, 851.978)})
- local tween2 = TweenService:Create(lava2, tweenInfo, {Position = Vector3.new(752.156, 729.581, 841.517)})
- local tween3 = TweenService:Create(lava3, tweenInfo, {Position = Vector3.new(752.156, 716.572, 831.246)})
- local tween4 = TweenService:Create(lava4, tweenInfo, {Position = Vector3.new(752.156, 716.598, 862.528)})
- tween:Play()
- tween2:Play()
- tween3:Play()
- tween4:Play()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement