Advertisement
Guest User

Untitled

a guest
Dec 5th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.41 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. do
  4. print("ahoy boy")
  5. script.Parent = Player.Character
  6.  
  7. --RemoteEvent for communicating
  8. local Event = Instance.new("RemoteEvent")
  9. Event.Name = "UserInput_Event"
  10.  
  11. --Fake event to make stuff like Mouse.KeyDown work
  12. local function fakeEvent()
  13. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  14. t.connect = t.Connect
  15. return t
  16. end
  17.  
  18. --Creating fake input objects with fake variables
  19. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  20. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  21. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  22. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  23. end}
  24. --Merged 2 functions into one by checking amount of arguments
  25. CAS.UnbindAction = CAS.BindAction
  26.  
  27. --This function will trigger the events that have been :Connect()'ed
  28. local function te(self,ev,...)
  29. local t = m[ev]
  30. if t and t._fakeEvent and t.Function then
  31. t.Function(...)
  32. end
  33. end
  34. m.TrigEvent = te
  35. UIS.TrigEvent = te
  36.  
  37. Event.OnServerEvent:Connect(function(plr,io)
  38. if plr~=Player then return end
  39. if io.isMouse then
  40. m.Target = io.Target
  41. m.Hit = io.Hit
  42. else
  43. local b = io.UserInputState == Enum.UserInputState.Begin
  44. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  45. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  46. end
  47. for _,t in pairs(CAS.Actions) do
  48. for _,k in pairs(t.Keys) do
  49. if k==io.KeyCode then
  50. t.Function(t.Name,io.UserInputState,io)
  51. end
  52. end
  53. end
  54. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  55. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  56. end
  57. end)
  58. Event.Parent = NLS([==[
  59. local Player = game:GetService("Players").LocalPlayer
  60. local Event = script:WaitForChild("UserInput_Event")
  61.  
  62. local UIS = game:GetService("UserInputService")
  63. local input = function(io,a)
  64. if a then return end
  65. --Since InputObject is a client-side instance, we create and pass table instead
  66. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  67. end
  68. UIS.InputBegan:Connect(input)
  69. UIS.InputEnded:Connect(input)
  70.  
  71. local Mouse = Player:GetMouse()
  72. local h,t
  73. --Give the server mouse data 30 times every second, but only if the values changed
  74. --If player is not moving their mouse, client won't fire events
  75. while wait(1/30) do
  76. if h~=Mouse.Hit or t~=Mouse.Target then
  77. h,t=Mouse.Hit,Mouse.Target
  78. Event:FireServer({isMouse=true,Target=t,Hit=h})
  79. end
  80. end]==],Player.Character)
  81. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  82. end
  83. -- Farewell Infortality.
  84. -- Version: 2.82
  85. -- Instances:
  86. repeat wait() until owner
  87. local Player = owner
  88. repeat wait() until Player.Character
  89. local Character = Player.Character
  90. local ScreenGui = Instance.new("ScreenGui")
  91. local AnimationScreen = Instance.new("Frame")
  92. local Title = Instance.new("TextLabel")
  93. local RopeImage = Instance.new("ImageLabel")
  94. local Keyframe = 1
  95. local PtKeyFrame = 1
  96. local DelayFrame = 0
  97. local PtDelayFrame = 0
  98. local PtMaxDelay = 3
  99. local MaxDelay = 2
  100. local RunState = 0
  101. local MusicPlay = 0
  102. local Humanoid = Character:FindFirstChildOfClass("Humanoid")
  103. local Music = Instance.new("Sound",Character:FindFirstChild("Torso"))
  104. local JumpRopeTextUi = Instance.new("ImageLabel")
  105. local CurrentSound = Instance.new("Sound",Character:FindFirstChild("Torso"))
  106. local MainText = Instance.new("ImageLabel")
  107. local Numbers = Instance.new("ImageLabel")
  108. local PtBillBoard =Instance.new("BillboardGui")
  109. local ImagePt =Instance.new("ImageLabel")
  110. local PlaytimeImages = {1890933541,1890933942,1890934453,1890934875,1890935343,1890935748,1890936113}
  111. 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"}
  112. local RunButton = Instance.new("TextButton")
  113. --Properties:
  114. RunButton.Name = "RunButton"
  115. RunButton.Parent = AnimationScreen
  116. RunButton.AnchorPoint = Vector2.new(0, 1)
  117. RunButton.BackgroundColor3 = Color3.new(1, 0, 0.0156863)
  118. RunButton.BackgroundTransparency = 0.5
  119. RunButton.BorderColor3 = Color3.new(0.403922, 0.0862745, 0.0901961)
  120. RunButton.Size = UDim2.new(0, 71, 0, 27)
  121. RunButton.Font = Enum.Font.SourceSansLight
  122. RunButton.Text = "Run/Walk"
  123. RunButton.TextColor3 = Color3.new(0, 0, 0)
  124. RunButton.TextSize = 14
  125.  
  126. ScreenGui.Parent = Player:WaitForChild("PlayerGui")
  127. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  128.  
  129. AnimationScreen.Name = "AnimationScreen"
  130. AnimationScreen.Parent = ScreenGui
  131. AnimationScreen.BackgroundColor3 = Color3.new(1, 1, 1)
  132. AnimationScreen.BackgroundTransparency = 0.5
  133. AnimationScreen.Position = UDim2.new(0.0485074632, 0, 0.611987352, 0)
  134. AnimationScreen.Size = UDim2.new(0, 332, 0, 232)
  135.  
  136. ImagePt.Image = "http://www.roblox.com/asset/?id="..PlaytimeImages[1]
  137. ImagePt.Size=UDim2.new(1,0,1,0)
  138. ImagePt.Position=UDim2.new(0,0,0,0)
  139. ImagePt.BackgroundTransparency = 1
  140. ImagePt.Parent=PtBillBoard
  141.  
  142. PtBillBoard.Parent = Character.Torso
  143. PtBillBoard.Adornee = Character.Torso
  144. PtBillBoard.Size=UDim2.new(6,0,6,0)
  145. PtBillBoard.StudsOffset=Vector3.new(0,0.2,0)
  146. PtBillBoard.AlwaysOnTop = false
  147.  
  148. Title.Name = "Title"
  149. Title.Parent = AnimationScreen
  150. Title.BackgroundColor3 = Color3.new(1, 1, 1)
  151. Title.BackgroundTransparency = 1
  152. Title.Size = UDim2.new(0, 332, 0, 31)
  153. Title.Font = Enum.Font.SourceSansLight
  154. Title.Text = "Current rope animation:"
  155. Title.TextColor3 = Color3.new(0, 0, 0)
  156. Title.TextSize = 20
  157.  
  158. RopeImage.Name = "RopeImage"
  159. RopeImage.Parent = AnimationScreen
  160. RopeImage.BackgroundColor3 = Color3.new(1, 1, 1)
  161. RopeImage.Position = UDim2.new(0.0572289154, 0, 0.133620694, 0)
  162. RopeImage.Size = UDim2.new(0, 299, 0, 184)
  163. RopeImage.Image = "rbxasset://textures/ui/GuiImagePlaceholder.png"
  164. RopeImage.BackgroundTransparency = 1
  165.  
  166. JumpRopeTextUi.Name = "JumpRopeTextUi"
  167. JumpRopeTextUi.Parent = ScreenGui
  168. JumpRopeTextUi.AnchorPoint = Vector2.new(0.5, 0.5)
  169. JumpRopeTextUi.BackgroundColor3 = Color3.new(1, 1, 1)
  170. JumpRopeTextUi.BackgroundTransparency = 1
  171. JumpRopeTextUi.Position = UDim2.new(0.5, 0, 0.5, 0)
  172. JumpRopeTextUi.Size = UDim2.new(0.100000001, 523, 0.0500000007, 188)
  173. JumpRopeTextUi.Image = "http://www.roblox.com/asset/?id=4489655941"
  174. JumpRopeTextUi.Visible = false
  175.  
  176. MainText.Name = "MainText"
  177. MainText.Parent = JumpRopeTextUi
  178. MainText.AnchorPoint = Vector2.new(0.5, 0)
  179. MainText.BackgroundColor3 = Color3.new(1, 1, 1)
  180. MainText.BackgroundTransparency = 1
  181. MainText.Position = UDim2.new(0.495028168, 0, 0.70599997, 0)
  182. MainText.Size = UDim2.new(0, 78, 0, 41)
  183. MainText.Image = "http://www.roblox.com/asset/?id=4489668257"
  184. MainText.ScaleType = Enum.ScaleType.Tile
  185. MainText.TileSize = UDim2.new(2, 0, 2, 0)
  186.  
  187. Numbers.Name = "Numbers"
  188. Numbers.Parent = JumpRopeTextUi
  189. Numbers.AnchorPoint = Vector2.new(0.5, 0)
  190. Numbers.BackgroundColor3 = Color3.new(1, 1, 1)
  191. Numbers.BackgroundTransparency = 1
  192. Numbers.Position = UDim2.new(0.540000021, 0, 0.70599997, 0)
  193. Numbers.Size = UDim2.new(0, 28, 0, 38)
  194. Numbers.Image = "http://www.roblox.com/asset/?id=4489668257"
  195. Numbers.ImageRectOffset = Vector2.new(0, 118)
  196. Numbers.ImageRectSize = Vector2.new(60, 80)
  197. Numbers.SliceCenter = Rect.new(0, 0, 0, 119)
  198. Numbers.TileSize = UDim2.new(2, 0, 2, 0)
  199.  
  200. Music.Looped = true
  201. Music.SoundId = "rbxassetid://1953605962"
  202. Music.Volume = 2
  203.  
  204. CurrentSound.Volume = 2
  205. -- Scripts:
  206. -- To remove each part/thing from the player
  207. repeat wait() until Character:FindFirstChildOfClass("Accessory")
  208. Humanoid.Animator:Destroy()
  209. Character.Animate:Destroy()
  210. for i,v in pairs(Character:GetChildren()) do
  211. if v.ClassName then
  212. if v.ClassName == "Union" or v.ClassName == "Part" or v.ClassName == "MeshPart" then
  213. v.Transparency = 1
  214. end
  215. if v.ClassName == "Accessory" then
  216. if v.Handle then
  217. v.Handle:Destroy()
  218. end
  219. end
  220. end
  221. end
  222. if Character.Head then
  223. Character.Head.face:Destroy()
  224. end
  225. -- idk but playtime is SLOOOW
  226. Humanoid.WalkSpeed = 12
  227. function UpdateKeyframe()
  228. if Keyframe >= #RopeTextures then
  229. Keyframe = 0
  230. end
  231. DelayFrame = DelayFrame+1
  232. if DelayFrame >= MaxDelay then
  233. DelayFrame = 0
  234. Keyframe = Keyframe + 1
  235. RopeImage.Image = RopeTextures[Keyframe]
  236. end
  237. end
  238. function UpdatePlayTime()
  239. if PtKeyFrame >= #PlaytimeImages then
  240. PtKeyFrame = 0
  241. end
  242. PtDelayFrame = PtDelayFrame+1
  243. if PtDelayFrame >= PtMaxDelay then
  244. PtDelayFrame = 0
  245. PtKeyFrame = PtKeyFrame + 1
  246. ImagePt.Image = "http://www.roblox.com/asset/?id="..PlaytimeImages[PtKeyFrame]
  247. end
  248. end
  249. RunButton.MouseButton1Click:connect(function()
  250. if RunState == 0 then
  251. RunState = 1
  252. Humanoid.WalkSpeed = 20
  253. else
  254. RunState = 0
  255. Humanoid.WalkSpeed = 12
  256. end
  257. end)
  258. Mouse.KeyDown:connect(function(K)
  259. if string.lower(K) == "q" then
  260. CurrentSound.SoundId = "rbxassetid://1891351859"
  261. CurrentSound:Play()
  262. end
  263. if string.lower(K) == "n" then
  264. if MusicPlay == 0 then
  265. MusicPlay = 1
  266. Music:Play()
  267. else
  268. MusicPlay = 0
  269. Music:Stop()
  270. end
  271. end
  272. end)
  273. while true do
  274. wait(1/60)
  275. UpdateKeyframe()
  276. UpdatePlayTime()
  277. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement