Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- made by _Exec4tble_#2226
- execute loadstring below to stay updated:
- loadstring(game:HttpGet('https://pastebin.com/raw/0dunVe3x'))()
- -------------------------
- hold Q/E to move DOWN/UP
- press X to toggle the script
- press F to toggle fling mode
- -------------------------
- ]]--
- local pl = game.Players.LocalPlayer
- local uis = game:GetService("UserInputService")
- local placed = game.Workspace:FindFirstChild("playerPlaced")
- local lad = nil
- local ch = pl.Character
- local hrp = ch.HumanoidRootPart
- if _G.began and typeof(_G.began) == "RBXScriptConnection" then _G.began:Disconnect() end; task.wait()
- if _G.ended and typeof(_G.ended) == "RBXScriptConnection" then _G.ended:Disconnect() end; task.wait()
- state = true
- flingState = false
- moveVal = 0
- loopVal = 0
- _G.began = nil
- _G.ended = nil
- if placed:FindFirstChild(pl.Name .. "_ladder") then
- lad = placed:FindFirstChild(pl.Name .. "_ladder")
- end
- _G.began = uis.InputBegan:Connect(function(key, typ)
- if typ then return end
- if key.KeyCode == Enum.KeyCode.X then
- state = not state
- if placed:FindFirstChild(pl.Name .. "_ladder") then
- lad = placed:FindFirstChild(pl.Name .. "_ladder")
- end
- print(state and "turned on" or "turned off")
- elseif key.KeyCode == Enum.KeyCode.E then
- moveVal = 1
- elseif key.KeyCode == Enum.KeyCode.Q then
- moveVal = -1
- elseif key.KeyCode == Enum.KeyCode.F then
- flingState = not flingState
- end
- end)
- _G.ened = uis.InputEnded:Connect(function(key, typ)
- if typ then return end
- if key.KeyCode == Enum.KeyCode.E then
- moveVal = 0
- elseif key.KeyCode == Enum.KeyCode.Q then
- moveVal = 0
- end
- end)
- function rng(n)
- return math.random(-n*n,n*n)
- end
- local incr = true
- while task.wait() do
- if state then
- if incr then
- loopVal += 0.15
- if loopVal >= 1 then
- incr = false
- end
- else
- loopVal -= 0.15
- if loopVal <= -3 then
- incr = true
- end
- end
- local suc, res = pcall(function()
- ch = pl.Character
- hrp = ch.HumanoidRootPart
- local defPos = hrp.CFrame * CFrame.new(0,-3.5+moveVal,0) * CFrame.Angles(math.rad(90),0,0)
- local flingPos = hrp.CFrame * CFrame.new(0,moveVal+loopVal,-6) * CFrame.Angles(math.rad(90),0,0)
- lad:SetPrimaryPartCFrame(flingState and flingPos or defPos)
- for _,part in next, lad:GetChildren() do
- if part:IsA("BasePart") then
- part.AssemblyLinearVelocity = flingState and Vector3.new(rng(50),300,rng(50)) or Vector3.zero
- part.AssemblyAngularVelocity = flingState and Vector3.zero or Vector3.zero
- if flingState then
- part.CanCollide = false
- else
- part.CanCollide = (not part.Name == "Center" and false or true)
- end
- end
- end
- end)
- if not suc and (not res:lower():find("setprim")) then warn(res) end
- else
- for _,part in next, lad:GetChildren() do
- if part:IsA("BasePart") then
- part.CanCollide = true
- end
- end
- end
- end
Advertisement
Advertisement