Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- do
- print("ahoy boy")
- script.Parent = Player.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent and t.Function then
- t.Function(...)
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=Player then return end
- if io.isMouse then
- m.Target = io.Target
- m.Hit = io.Hit
- else
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local Mouse = Player:GetMouse()
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- end]==],Player.Character)
- Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
- end
- -- Farewell Infortality.
- -- Version: 2.82
- -- Instances:
- repeat wait() until owner
- local Player = owner
- repeat wait() until Player.Character
- local Character = Player.Character
- local ScreenGui = Instance.new("ScreenGui")
- local AnimationScreen = Instance.new("Frame")
- local Title = Instance.new("TextLabel")
- local RopeImage = Instance.new("ImageLabel")
- local Keyframe = 1
- local PtKeyFrame = 1
- local DelayFrame = 0
- local PtDelayFrame = 0
- local PtMaxDelay = 3
- local MaxDelay = 2
- local RunState = 0
- local MusicPlay = 0
- local Humanoid = Character:FindFirstChildOfClass("Humanoid")
- local Music = Instance.new("Sound",Character:FindFirstChild("Torso"))
- local JumpRopeTextUi = Instance.new("ImageLabel")
- local CurrentSound = Instance.new("Sound",Character:FindFirstChild("Torso"))
- local MainText = Instance.new("ImageLabel")
- local Numbers = Instance.new("ImageLabel")
- local PtBillBoard =Instance.new("BillboardGui")
- local ImagePt =Instance.new("ImageLabel")
- local PlaytimeImages = {1890933541,1890933942,1890934453,1890934875,1890935343,1890935748,1890936113}
- local RopeTextures = {"http://www.roblox.com/asset/?id=4489605308","http://www.roblox.com/asset/?id=4489606097","http://www.roblox.com/asset/?id=4489606745","http://www.roblox.com/asset/?id=4489607796","http://www.roblox.com/asset/?id=4489609123","http://www.roblox.com/asset/?id=4489610195","http://www.roblox.com/asset/?id=4489611315","http://www.roblox.com/asset/?id=4489611922"}
- local RunButton = Instance.new("TextButton")
- --Properties:
- RunButton.Name = "RunButton"
- RunButton.Parent = AnimationScreen
- RunButton.AnchorPoint = Vector2.new(0, 1)
- RunButton.BackgroundColor3 = Color3.new(1, 0, 0.0156863)
- RunButton.BackgroundTransparency = 0.5
- RunButton.BorderColor3 = Color3.new(0.403922, 0.0862745, 0.0901961)
- RunButton.Size = UDim2.new(0, 71, 0, 27)
- RunButton.Font = Enum.Font.SourceSansLight
- RunButton.Text = "Run/Walk"
- RunButton.TextColor3 = Color3.new(0, 0, 0)
- RunButton.TextSize = 14
- ScreenGui.Parent = Player:WaitForChild("PlayerGui")
- ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- AnimationScreen.Name = "AnimationScreen"
- AnimationScreen.Parent = ScreenGui
- AnimationScreen.BackgroundColor3 = Color3.new(1, 1, 1)
- AnimationScreen.BackgroundTransparency = 0.5
- AnimationScreen.Position = UDim2.new(0.0485074632, 0, 0.611987352, 0)
- AnimationScreen.Size = UDim2.new(0, 332, 0, 232)
- ImagePt.Image = "http://www.roblox.com/asset/?id="..PlaytimeImages[1]
- ImagePt.Size=UDim2.new(1,0,1,0)
- ImagePt.Position=UDim2.new(0,0,0,0)
- ImagePt.BackgroundTransparency = 1
- ImagePt.Parent=PtBillBoard
- PtBillBoard.Parent = Character.Torso
- PtBillBoard.Adornee = Character.Torso
- PtBillBoard.Size=UDim2.new(6,0,6,0)
- PtBillBoard.StudsOffset=Vector3.new(0,0.2,0)
- PtBillBoard.AlwaysOnTop = false
- Title.Name = "Title"
- Title.Parent = AnimationScreen
- Title.BackgroundColor3 = Color3.new(1, 1, 1)
- Title.BackgroundTransparency = 1
- Title.Size = UDim2.new(0, 332, 0, 31)
- Title.Font = Enum.Font.SourceSansLight
- Title.Text = "Current rope animation:"
- Title.TextColor3 = Color3.new(0, 0, 0)
- Title.TextSize = 20
- RopeImage.Name = "RopeImage"
- RopeImage.Parent = AnimationScreen
- RopeImage.BackgroundColor3 = Color3.new(1, 1, 1)
- RopeImage.Position = UDim2.new(0.0572289154, 0, 0.133620694, 0)
- RopeImage.Size = UDim2.new(0, 299, 0, 184)
- RopeImage.Image = "rbxasset://textures/ui/GuiImagePlaceholder.png"
- RopeImage.BackgroundTransparency = 1
- JumpRopeTextUi.Name = "JumpRopeTextUi"
- JumpRopeTextUi.Parent = ScreenGui
- JumpRopeTextUi.AnchorPoint = Vector2.new(0.5, 0.5)
- JumpRopeTextUi.BackgroundColor3 = Color3.new(1, 1, 1)
- JumpRopeTextUi.BackgroundTransparency = 1
- JumpRopeTextUi.Position = UDim2.new(0.5, 0, 0.5, 0)
- JumpRopeTextUi.Size = UDim2.new(0.100000001, 523, 0.0500000007, 188)
- JumpRopeTextUi.Image = "http://www.roblox.com/asset/?id=4489655941"
- JumpRopeTextUi.Visible = false
- MainText.Name = "MainText"
- MainText.Parent = JumpRopeTextUi
- MainText.AnchorPoint = Vector2.new(0.5, 0)
- MainText.BackgroundColor3 = Color3.new(1, 1, 1)
- MainText.BackgroundTransparency = 1
- MainText.Position = UDim2.new(0.495028168, 0, 0.70599997, 0)
- MainText.Size = UDim2.new(0, 78, 0, 41)
- MainText.Image = "http://www.roblox.com/asset/?id=4489668257"
- MainText.ScaleType = Enum.ScaleType.Tile
- MainText.TileSize = UDim2.new(2, 0, 2, 0)
- Numbers.Name = "Numbers"
- Numbers.Parent = JumpRopeTextUi
- Numbers.AnchorPoint = Vector2.new(0.5, 0)
- Numbers.BackgroundColor3 = Color3.new(1, 1, 1)
- Numbers.BackgroundTransparency = 1
- Numbers.Position = UDim2.new(0.540000021, 0, 0.70599997, 0)
- Numbers.Size = UDim2.new(0, 28, 0, 38)
- Numbers.Image = "http://www.roblox.com/asset/?id=4489668257"
- Numbers.ImageRectOffset = Vector2.new(0, 118)
- Numbers.ImageRectSize = Vector2.new(60, 80)
- Numbers.SliceCenter = Rect.new(0, 0, 0, 119)
- Numbers.TileSize = UDim2.new(2, 0, 2, 0)
- Music.Looped = true
- Music.SoundId = "rbxassetid://1953605962"
- Music.Volume = 2
- CurrentSound.Volume = 2
- -- Scripts:
- -- To remove each part/thing from the player
- repeat wait() until Character:FindFirstChildOfClass("Accessory")
- Humanoid.Animator:Destroy()
- Character.Animate:Destroy()
- for i,v in pairs(Character:GetChildren()) do
- if v.ClassName then
- if v.ClassName == "Union" or v.ClassName == "Part" or v.ClassName == "MeshPart" then
- v.Transparency = 1
- end
- if v.ClassName == "Accessory" then
- if v.Handle then
- v.Handle:Destroy()
- end
- end
- end
- end
- if Character.Head then
- Character.Head.face:Destroy()
- end
- -- idk but playtime is SLOOOW
- Humanoid.WalkSpeed = 12
- function UpdateKeyframe()
- if Keyframe >= #RopeTextures then
- Keyframe = 0
- end
- DelayFrame = DelayFrame+1
- if DelayFrame >= MaxDelay then
- DelayFrame = 0
- Keyframe = Keyframe + 1
- RopeImage.Image = RopeTextures[Keyframe]
- end
- end
- function UpdatePlayTime()
- if PtKeyFrame >= #PlaytimeImages then
- PtKeyFrame = 0
- end
- PtDelayFrame = PtDelayFrame+1
- if PtDelayFrame >= PtMaxDelay then
- PtDelayFrame = 0
- PtKeyFrame = PtKeyFrame + 1
- ImagePt.Image = "http://www.roblox.com/asset/?id="..PlaytimeImages[PtKeyFrame]
- end
- end
- RunButton.MouseButton1Click:connect(function()
- if RunState == 0 then
- RunState = 1
- Humanoid.WalkSpeed = 20
- else
- RunState = 0
- Humanoid.WalkSpeed = 12
- end
- end)
- Mouse.KeyDown:connect(function(K)
- if string.lower(K) == "q" then
- CurrentSound.SoundId = "rbxassetid://1891351859"
- CurrentSound:Play()
- end
- if string.lower(K) == "n" then
- if MusicPlay == 0 then
- MusicPlay = 1
- Music:Play()
- else
- MusicPlay = 0
- Music:Stop()
- end
- end
- end)
- while true do
- wait(1/60)
- UpdateKeyframe()
- UpdatePlayTime()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement