Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Made by Tweakified, Neonblox Games
- Youtube Tutorial: https://youtu.be/MjnVL85-J_Q
- Discord Support: https://discord.com/invite/JdaFf7p
- Script Type: Local Script
- Script Parent: StarterPlayers -> StarterPlayerScripts
- --]]
- local TweenService = game:GetService("TweenService")
- local Players = game:GetService("Players")
- local player = Players.LocalPlayer
- local BouncePadTweenOpenInfo = TweenInfo.new(0.4)
- local BouncePadTweenCloseInfo = TweenInfo.new(0.2)
- local BounceSound = workspace:WaitForChild("BounceEffect")
- local function BouncepadEffect(char, BouncePadModel)
- local HumanoidRootPart = char.PrimaryPart
- if HumanoidRootPart ~= nil then
- local TempBounceInProgress = BouncePadModel:WaitForChild("BounceInProgress")
- if TempBounceInProgress.Value == false then
- TempBounceInProgress.Value = true
- local Pad = BouncePadModel.PrimaryPart
- Pad.CanCollide = false
- local BounceVelocity = Instance.new("BodyVelocity")
- BounceVelocity.Name = "BounceVelocity"
- BounceVelocity.Velocity = Vector3.new(0, BouncePadModel:WaitForChild("Power").Value, 0)
- BounceVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
- BounceVelocity.P = math.huge
- BounceVelocity.Parent = HumanoidRootPart
- spawn(function()
- wait(BouncePadModel:WaitForChild("Time").Value)
- BounceVelocity:Destroy()
- end)
- local CoinMesh = BouncePadModel:WaitForChild("Coil"):WaitForChild("Mesh")
- local TempTween1 = TweenService:Create(CoinMesh, BouncePadTweenOpenInfo, {Scale = Vector3.new(CoinMesh.Scale.X, CoinMesh.Scale.Y, CoinMesh.Scale.Z + 2)})
- local TempTween2 = TweenService:Create(Pad, BouncePadTweenOpenInfo, {CFrame = Pad.CFrame + Vector3.new(0, 4, 0)})
- TempTween1:Play()
- TempTween2:Play()
- BounceSound:Play()
- wait(0.1)
- Pad.CanCollide = true
- wait(0.4)
- local TempTween3 = TweenService:Create(CoinMesh, BouncePadTweenCloseInfo, {Scale = Vector3.new(CoinMesh.Scale.X, CoinMesh.Scale.Y, CoinMesh.Scale.Z - 2)})
- local TempTween4 = TweenService:Create(Pad, BouncePadTweenCloseInfo, {CFrame = Pad.CFrame - Vector3.new(0, 4, 0)})
- TempTween3:Play()
- TempTween4:Play()
- TempTween4.Completed:Wait()
- TempBounceInProgress.Value = false
- end
- end
- end
- local BouncePadFolder = workspace:WaitForChild("BouncePads")
- for _,BouncePad in pairs(BouncePadFolder:GetChildren()) do
- BouncePad.PrimaryPart.Touched:Connect(function(hit)
- local char = hit.Parent
- if char ~= nil then
- local TempPlayer = Players:GetPlayerFromCharacter(char)
- if TempPlayer ~= nil and player == TempPlayer then
- BouncepadEffect(char, BouncePad)
- end
- end
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement