Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87.  
  88.  
  89. -----------------------------------------------
  90. --DANCE TO THE BEAT, WAVE YOUR HANDS TOGETHER--
  91. ------------------------------------------------
  92. --I wanted to make something like Heavy Dance.--
  93. -- ~Sugarie --
  94. ------------------------------------------------
  95.  
  96. wait(1/60)
  97. Effects = { }
  98. local Player = owner
  99. local chara = Player.Character
  100. local Humanoid = chara:FindFirstChildOfClass("Humanoid")
  101.  
  102. local LeftArm = chara["Left Arm"]
  103. local RightArm = chara["Right Arm"]
  104. local LeftLeg = chara["Left Leg"]
  105. local RightLeg = chara["Right Leg"]
  106. local Head = chara.Head
  107. local Torso = chara.Torso
  108. local Camera = game.Workspace.CurrentCamera
  109. local RootPart = chara.HumanoidRootPart
  110. local RootJoint = RootPart.RootJoint
  111. local attack = false
  112. local Anim = 'Idle'
  113. local attacktype = 1
  114. local delays = false
  115. local play = true
  116. local targetted = nil
  117. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  118. local velocity = RootPart.Velocity.y
  119. local sine = 0
  120. local change = 1
  121. local doe = 0
  122. local Create = LoadLibrary("RbxUtility").Create
  123. Humanoid.WalkSpeed = 2
  124.  
  125. Humanoid.Animator.Parent = nil
  126. chara.Animate.Parent = nil
  127.  
  128. local newMotor = function(part0, part1, c0, c1)
  129. local w = Create('Motor'){
  130. Parent = part0,
  131. Part0 = part0,
  132. Part1 = part1,
  133. C0 = c0,
  134. C1 = c1,
  135. }
  136. return w
  137. end
  138.  
  139. function clerp(a, b, t)
  140. return a:lerp(b, t)
  141. end
  142.  
  143. RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  144. NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  145.  
  146. local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0))
  147. local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
  148. local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
  149. local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
  150. RootJoint.C1 = CFrame.new(0, 0, 0)
  151. RootJoint.C0 = CFrame.new(0, 0, 0)
  152. Torso.Neck.C1 = CFrame.new(0, 0, 0)
  153. Torso.Neck.C0 = CFrame.new(0, 1.5, 0)
  154.  
  155. local rarmc1 = RW.C1
  156. local larmc1 = LW.C1
  157. local rlegc1 = RH.C1
  158. local llegc1 = LH.C1
  159.  
  160. local resetc1 = false
  161.  
  162. function PlayAnimationFromTable(table, speed, bool)
  163. RootJoint.C0 = clerp(RootJoint.C0, table[1], speed)
  164. Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed)
  165. RW.C0 = clerp(RW.C0, table[3], speed)
  166. LW.C0 = clerp(LW.C0, table[4], speed)
  167. RH.C0 = clerp(RH.C0, table[5], speed)
  168. LH.C0 = clerp(LH.C0, table[6], speed)
  169. if bool == true then
  170. if resetc1 == false then
  171. resetc1 = true
  172. RootJoint.C1 = RootJoint.C1
  173. Torso.Neck.C1 = Torso.Neck.C1
  174. RW.C1 = rarmc1
  175. LW.C1 = larmc1
  176. RH.C1 = rlegc1
  177. LH.C1 = llegc1
  178. end
  179. end
  180. end
  181.  
  182. ArtificialHB = Instance.new("BindableEvent", script)
  183. ArtificialHB.Name = "Heartbeat"
  184. script:WaitForChild("Heartbeat")
  185. frame = 0.03333333333333
  186. tf = 0
  187. allowframeloss = false
  188. tossremainder = false
  189. lastframe = tick()
  190. script.Heartbeat:Fire()
  191. game:GetService("RunService").Heartbeat:connect(function(s, p)
  192. tf = tf + s
  193. if tf >= frame then
  194. if allowframeloss then
  195. script.Heartbeat:Fire()
  196. lastframe = tick()
  197. else
  198. for i = 1, math.floor(tf / frame) do
  199. script.Heartbeat:Fire()
  200. end
  201. lastframe = tick()
  202. end
  203. if tossremainder then
  204. tf = 0
  205. else
  206. tf = tf - frame * math.floor(tf / frame)
  207. end
  208. end
  209. end)
  210. function swait(num)
  211. if num == 0 or num == nil then
  212. ArtificialHB.Event:wait()
  213. else
  214. for i = 0, num do
  215. ArtificialHB.Event:wait()
  216. end
  217. end
  218. end
  219.  
  220. function RemoveOutlines(part)
  221. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  222. end
  223.  
  224. sndid = "rbxassetid://176322684"
  225. sndpi = .7
  226. saun = Instance.new("Sound",Head)
  227. saun.Volume = 1
  228. saun.Pitch = sndpi
  229. saun.SoundId = sndid
  230. saun.Name = "a"
  231. saun.Looped = true
  232. saun:Play()
  233.  
  234. dant = 0
  235.  
  236. Mouse.KeyDown:connect(function(key)
  237. key=key:lower()
  238. if key=="e" then
  239. if dant == 0 then
  240. dant = 1
  241. sndid = "rbxassetid://448668887"
  242. sndpi = 1
  243. elseif dant == 1 then
  244. dant = 0
  245. sndid = "rbxassetid://176322684"
  246. sndpi = .7
  247. end
  248. saun.Pitch = sndpi
  249. saun.SoundId = sndid
  250. saun:Play()
  251. end
  252. end)
  253.  
  254. while true do
  255. if Head:FindFirstChild("a")==nil then
  256. saun = Instance.new("Sound",Head)
  257. saun.Volume = 1
  258. saun.Pitch = sndpi
  259. saun.SoundId = sndid
  260. saun.Name = "a"
  261. saun.Looped = true
  262. saun:Play()
  263. end
  264. if dant == 0 then
  265. for i = 0, 1, 0.25 do
  266. swait()
  267. PlayAnimationFromTable({
  268. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  269. CFrame.new(0, 1.4999938, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  270. CFrame.new(0.833580494, 1.12330246, 6.2584877e-07, -0.342020094, -1.63087847e-07, 0.939692676, 0.321394086, -0.939692557, 0.116977669, 0.883022249, 0.342020333, 0.321393758),
  271. CFrame.new(-0.833579302, 1.12330115, -1.49011612e-07, -0.342019886, 4.07719511e-08, -0.939692736, -0.321392894, -0.939693034, 0.116977319, -0.883022726, 0.342019141, 0.321393728),
  272. CFrame.new(0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  273. CFrame.new(-0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  274. }, .5, false)
  275. end
  276. for i = 0, 1, 0.25 do
  277. swait()
  278. PlayAnimationFromTable({
  279. CFrame.new(-0.268402338, -0.187939167, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736, 0, 0, 0, 1),
  280. CFrame.new(-0.409892142, 1.36144388, 0, 0.766044796, -0.642787218, 0, 0.642787218, 0.766044855, 0, 0, 0, 1),
  281. CFrame.new(0.535924554, 1.16478181, 3.87430191e-07, -0.431316972, 0.32139343, 0.843013644, 0.185034022, -0.883022308, 0.431316644, 0.883022249, 0.342020333, 0.321393758),
  282. CFrame.new(-1.03069234, 0.594579875, -2.38418579e-07, -0.211470842, 0.321393758, -0.923030972, -0.418988168, -0.883022726, -0.211470872, -0.883022726, 0.342019141, 0.321393728),
  283. CFrame.new(0.951213062, -1.54518354, 0, 0.866025686, -0.499999642, 0, 0.499999642, 0.866025686, 0, 0, 0, 1),
  284. CFrame.new(0.214191973, -1.8503952, 0, 0.766044796, -0.642787218, 0, 0.642787218, 0.766044855, 0, 0, 0, 1),
  285. }, .5, false)
  286. end
  287. for i = 0, 1, 0.25 do
  288. swait()
  289. PlayAnimationFromTable({
  290. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  291. CFrame.new(0, 1.4999938, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  292. CFrame.new(0.833580494, 1.12330246, 6.2584877e-07, -0.342020094, -1.63087847e-07, 0.939692676, 0.321394086, -0.939692557, 0.116977669, 0.883022249, 0.342020333, 0.321393758),
  293. CFrame.new(-0.833579302, 1.12330115, -1.49011612e-07, -0.342019886, 4.07719511e-08, -0.939692736, -0.321392894, -0.939693034, 0.116977319, -0.883022726, 0.342019141, 0.321393728),
  294. CFrame.new(0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  295. CFrame.new(-0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  296. }, .5, false)
  297. end
  298. for i = 0, 1, 0.25 do
  299. swait()
  300. PlayAnimationFromTable({
  301. CFrame.new(0.268400908, -0.187940732, 0, 0.939692855, -0.342019945, 0, 0.342019975, 0.939692795, 0, 0, 0, 1),
  302. CFrame.new(0.409947664, 1.36144304, 0, 0.766039729, 0.642798781, 0, -0.642787337, 0.766043961, 0, 0, 0, 1),
  303. CFrame.new(1.03070939, 0.594575524, -2.2649765e-06, -0.21146287, -0.321413547, 0.923025966, 0.418989599, -0.883016884, -0.21149224, 0.883023918, 0.342015505, 0.321394145),
  304. CFrame.new(-0.535904408, 1.16477537, -3.27825546e-07, -0.431322306, -0.321409196, -0.843005002, -0.185032129, -0.883013964, 0.431334615, -0.883019984, 0.342027217, 0.321392536),
  305. CFrame.new(-0.214235365, -1.8503921, 0, 0.766041398, 0.64279145, 0, -0.64279151, 0.766041279, 0, 0, 0, 1),
  306. CFrame.new(-0.965987146, -1.57677674, 0, 0.866024733, 0.500001609, 0, -0.500001609, 0.866024613, 0, 0, 0, 1),
  307. }, .5, false)
  308. end
  309. elseif dant == 1 then
  310. for i = 0, 1, 0.1 do
  311. swait()
  312. PlayAnimationFromTable({
  313. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  314. CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  315. CFrame.new(1.09999847, 1.1920929e-07, -0.600001514, 0, 0, 1, 0.173647985, 0.984807849, 0, -0.984807849, 0.173647985, 0),
  316. CFrame.new(-1.09999847, 1.1920929e-07, -0.600001514, 0, 0, -1, -0.173647985, 0.984807849, 0, 0.984807849, 0.173647985, 0),
  317. CFrame.new(0.5, -1.99999881, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  318. CFrame.new(-0.5, -1.99999881, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  319. }, .2, false)
  320. end
  321. for i = 0, 1, 0.1 do
  322. swait()
  323. PlayAnimationFromTable({
  324. CFrame.new(-0.0436433926, 0, -0.113613628, 0.64278698, 0, -0.766044974, 0, 1, 0, 0.766044974, 0, 0.64278698),
  325. CFrame.new(0, 1.49999809, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  326. CFrame.new(1.09998989, 1, -0.599998474, 0, 0, 1, 1, 0, 0, 0, 1, 0),
  327. CFrame.new(-1.10000229, 1, -0.599998474, 0, 0, -1, -1, 0, 0, 0, 1, 0),
  328. CFrame.new(0.499988556, -1.99999797, -3.81469727e-06, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  329. CFrame.new(-0.500012398, -1.78038144, -0.819608092, 1, 0, 1.49011612e-08, 0, 0.499999046, -0.866025984, 0, 0.866026044, 0.499999046),
  330. }, .2, false)
  331. end
  332. for i = 0, 1, 0.1 do
  333. swait()
  334. PlayAnimationFromTable({
  335. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  336. CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  337. CFrame.new(1.09999847, 1.1920929e-07, -0.600001514, 0, 0, 1, 0.173647985, 0.984807849, 0, -0.984807849, 0.173647985, 0),
  338. CFrame.new(-1.09999847, 1.1920929e-07, -0.600001514, 0, 0, -1, -0.173647985, 0.984807849, 0, 0.984807849, 0.173647985, 0),
  339. CFrame.new(0.5, -1.99999881, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  340. CFrame.new(-0.5, -1.99999881, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  341. }, .2, false)
  342. end
  343. for i = 0, 1, 0.1 do
  344. swait()
  345. PlayAnimationFromTable({
  346. CFrame.new(0.261404335, 0, -0.167939946, 0.76604414, 0, 0.642788053, 0, 1, 0, -0.642788053, 0, 0.76604414),
  347. CFrame.new(0, 1.49999285, 0, 1.00000012, 0, 0, 0, 1, 0, 0, 0, 1.00000012),
  348. CFrame.new(1.10000622, 0.999999046, -0.599996626, 0, 0, 1.00000012, 1, 0, 0, 0, 1.00000012, 0),
  349. CFrame.new(-1.09999859, 0.999999046, -0.59999758, 0, 0, -1.00000012, -1, 0, 0, 0, 1.00000012, 0),
  350. CFrame.new(0.500000179, -1.78038287, -0.81961149, 1.00000012, -2.98023224e-08, 2.98023224e-08, 0, 0.499999046, -0.866025925, 0, 0.866025984, 0.499999106),
  351. CFrame.new(-0.500003874, -1.99999893, 3.81469772e-06, 1.00000012, 0, 0, 0, 1, 0, 0, 0, 1.00000012),
  352. }, .2, false)
  353. end
  354. end
  355. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement