Advertisement
lafur

Untitled

Aug 31st, 2018
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.63 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end player=game:GetService("Players").LocalPlayer
  6. char=player.Character
  7. mouse=player:GetMouse()
  8. dances = Instance.new("Sound", char.head)
  9. dances.SoundId = "http://www.roblox.com/asset/?id=131121468"
  10. dances.Volume = 1
  11. dances.Looped = true
  12. local dances2 = false
  13. dancc = Instance.new("Sound", char.head)
  14. dancc.SoundId = "http://www.roblox.com/asset/?id=167082542"
  15. dancc.Volume = 1
  16. dancc.Looped = true
  17. local danccc = false
  18.  
  19. dances3 = Instance.new("Sound", char.head)
  20. dances3.SoundId = "http://www.roblox.com/asset/?id=145279664"
  21. dances3.Volume = 1
  22. dances3.Looped = true
  23. local dances4 = false
  24. dances5 = Instance.new("Sound", char.head)
  25. dances5.SoundId = "http://www.roblox.com/asset/?id=149281165"
  26. dances5.Volume = 1
  27. dances5.Looped = true
  28. local dances6 = false
  29. cat1 = Instance.new("Sound", char.head)
  30. cat1.SoundId = "http://www.roblox.com/asset/?id=154664102"
  31. cat1.Volume = 1
  32. cat1.Looped = true
  33. local cat2 = false
  34. local dance = Instance.new("Animation", char)
  35. dance.AnimationId = "rbxassetid://168156427"
  36. dance.Name = "dance"
  37. local dancee = Instance.new("Animation", char)
  38. dancee.AnimationId = "rbxassetid://149359445"
  39. dancee.Name = "dancee"
  40. local danc = Instance.new("Animation", char)
  41. danc.AnimationId = "rbxassetid://144431365"
  42. danc.Name = "danc"
  43. local cat = Instance.new("Animation", char)
  44. cat.AnimationId = "rbxassetid://165729986"
  45. cat.Name = "cat"
  46. local shuffle = Instance.new("Animation", char)
  47. shuffle.AnimationId = "rbxassetid://168156427"
  48. shuffle.Name = "shuffle"
  49. local hop = Instance.new("Animation", char)
  50. hop.AnimationId = "rbxassetid://149359445"
  51. hop.Name = "hop"
  52. mouse.KeyDown:connect(function(key) local key=key:lower()
  53. if key=="f" then
  54. local vCharacter = char
  55. local hum = vCharacter:findFirstChild("Humanoid")
  56. blah = hum:LoadAnimation(char.dance)
  57. blah:Play()
  58. end
  59. end)
  60. mouse.KeyUp:connect(function(key) local key=key:lower()
  61. if key=="f" then
  62. blah:Stop()
  63. end
  64. end)
  65. mouse.KeyDown:connect(function(key) local key=key:lower()
  66. if key=="f" then
  67. dances2 = true
  68. dances:Play()
  69. end
  70. end)
  71. mouse.KeyUp:connect(function(key) local key=key:lower()
  72. if key=="f" then
  73. dances2 = false
  74. dances:Stop()
  75. end
  76. end)
  77. mouse.KeyDown:connect(function(key) local key=key:lower()
  78. if key=="r" then
  79. char.Animate.Disabled = true
  80. local vCharacter = char
  81. local hum = vCharacter:findFirstChild("Humanoid")
  82. blah2 = hum:LoadAnimation(char.dancee)
  83. blah2:Play()
  84. end
  85. end)
  86. mouse.KeyUp:connect(function(key) local key=key:lower()
  87. if key=="r" then
  88. char.Animate.Disabled = false
  89. blah2:Stop()
  90. end
  91. end)
  92. mouse.KeyDown:connect(function(key) local key=key:lower()
  93. if key=="r" then
  94. dances4 = true
  95. dances3:Play()
  96. end
  97. end)
  98. mouse.KeyUp:connect(function(key) local key=key:lower()
  99. if key=="r" then
  100. dances4 = false
  101. dances3:Stop()
  102. end
  103. end)
  104. mouse.KeyDown:connect(function(key) local key=key:lower()
  105. if key=="g" then
  106. local vCharacter = char
  107. local hum = vCharacter:findFirstChild("Humanoid")
  108. blah3 = hum:LoadAnimation(char.danc)
  109. blah3:Play()
  110. end
  111. end)
  112. mouse.KeyUp:connect(function(key) local key=key:lower()
  113. if key=="g" then
  114. blah3:Stop()
  115. end
  116. end)
  117. mouse.KeyDown:connect(function(key) local key=key:lower()
  118. if key=="g" then
  119. dances6 = true
  120. dances5:Play()
  121. end
  122. end)
  123. mouse.KeyUp:connect(function(key) local key=key:lower()
  124. if key=="g" then
  125. dances6 = false
  126. dances5:Stop()
  127. end
  128. end)
  129. mouse.KeyDown:connect(function(key) local key=key:lower()
  130. if key=="c" then
  131. local vCharacter = char
  132. local hum = vCharacter:findFirstChild("Humanoid")
  133. blah4 = hum:LoadAnimation(char.cat)
  134. blah4:Play()
  135. end
  136. end)
  137. mouse.KeyUp:connect(function(key) local key=key:lower()
  138. if key=="c" then
  139. blah4:Stop()
  140. end
  141. end)
  142. mouse.KeyDown:connect(function(key) local key=key:lower()
  143. if key=="c" then
  144. cat2 = true
  145. cat1:Play()
  146. end
  147. end)
  148. mouse.KeyUp:connect(function(key) local key=key:lower()
  149. if key=="c" then
  150. cat2 = false
  151. cat1:Stop()
  152. end
  153. end)
  154. mouse.KeyDown:connect(function(key) local key=key:lower()
  155. if key=="h" then
  156. local vCharacter = char
  157. local hum = vCharacter:findFirstChild("Humanoid")
  158. shufflee = hum:LoadAnimation(char.shuffle)
  159. shufflee:Play()
  160. wait(13)
  161. hoppin = hum:LoadAnimation(char.hop)
  162. hoppin:Play()
  163. end
  164. end)
  165. mouse.KeyUp:connect(function(key) local key=key:lower()
  166. if key=="h" then
  167. shufflee:Stop()
  168. hoppin:Stop()
  169. end
  170. end)
  171. mouse.KeyUp:connect(function(key) local key=key:lower()
  172. if key=="h" then
  173. hoppin:Stop()
  174. end
  175. end)
  176. mouse.KeyDown:connect(function(key) local key=key:lower()
  177. if key=="h" then
  178. shuffle2 = true
  179. dancc:Play()
  180. end
  181. end)
  182. mouse.KeyUp:connect(function(key) local key=key:lower()
  183. if key=="h" then
  184. danccc = false
  185. dancc:Stop()
  186. end
  187. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement