EARTHWORM_SALLY

Untitled

Jul 13th, 2020
116
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.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106. -----------------------------------------------
  107. --DANCE TO THE BEAT, WAVE YOUR HANDS TOGETHER--
  108. ------------------------------------------------
  109. --I wanted to make something like Heavy Dance.--
  110. -- ~Sugarie --
  111. ------------------------------------------------
  112.  
  113. wait(1/60)
  114. Effects = { }
  115. local Player = owner
  116. local chara = Player.Character
  117. local Humanoid = chara:FindFirstChildOfClass("Humanoid")
  118. local LeftArm = chara["Left Arm"]
  119. local RightArm = chara["Right Arm"]
  120. local LeftLeg = chara["Left Leg"]
  121. local RightLeg = chara["Right Leg"]
  122. local Head = chara.Head
  123. local Torso = chara.Torso
  124. local Camera = game.Workspace.CurrentCamera
  125. local RootPart = chara.HumanoidRootPart
  126. local RootJoint = RootPart.RootJoint
  127. local attack = false
  128. local Anim = 'Idle'
  129. local attacktype = 1
  130. local delays = false
  131. local play = true
  132. local targetted = nil
  133. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  134. local velocity = RootPart.Velocity.y
  135. local sine = 0
  136. local change = 1
  137. local doe = 0
  138. local Create = LoadLibrary("RbxUtility").Create
  139. Humanoid.WalkSpeed = 2
  140.  
  141. Humanoid.Animator.Parent = nil
  142. chara.Animate.Parent = nil
  143.  
  144. local newMotor = function(part0, part1, c0, c1)
  145. local w = Create('Motor'){
  146. Parent = part0,
  147. Part0 = part0,
  148. Part1 = part1,
  149. C0 = c0,
  150. C1 = c1,
  151. }
  152. return w
  153. end
  154.  
  155. function clerp(a, b, t)
  156. return a:lerp(b, t)
  157. end
  158.  
  159. RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  160. NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  161.  
  162. local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0))
  163. local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
  164. local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
  165. local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
  166. RootJoint.C1 = CFrame.new(0, 0, 0)
  167. RootJoint.C0 = CFrame.new(0, 0, 0)
  168. Torso.Neck.C1 = CFrame.new(0, 0, 0)
  169. Torso.Neck.C0 = CFrame.new(0, 1.5, 0)
  170.  
  171. local rarmc1 = RW.C1
  172. local larmc1 = LW.C1
  173. local rlegc1 = RH.C1
  174. local llegc1 = LH.C1
  175.  
  176. local resetc1 = false
  177.  
  178. function PlayAnimationFromTable(table, speed, bool)
  179. RootJoint.C0 = clerp(RootJoint.C0, table[1], speed)
  180. Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed)
  181. RW.C0 = clerp(RW.C0, table[3], speed)
  182. LW.C0 = clerp(LW.C0, table[4], speed)
  183. RH.C0 = clerp(RH.C0, table[5], speed)
  184. LH.C0 = clerp(LH.C0, table[6], speed)
  185. if bool == true then
  186. if resetc1 == false then
  187. resetc1 = true
  188. RootJoint.C1 = RootJoint.C1
  189. Torso.Neck.C1 = Torso.Neck.C1
  190. RW.C1 = rarmc1
  191. LW.C1 = larmc1
  192. RH.C1 = rlegc1
  193. LH.C1 = llegc1
  194. end
  195. end
  196. end
  197.  
  198. ArtificialHB = Instance.new("BindableEvent", script)
  199. ArtificialHB.Name = "Heartbeat"
  200. script:WaitForChild("Heartbeat")
  201. frame = 0.03333333333333
  202. tf = 0
  203. allowframeloss = false
  204. tossremainder = false
  205. lastframe = tick()
  206. script.Heartbeat:Fire()
  207. game:GetService("RunService").Heartbeat:connect(function(s, p)
  208. tf = tf + s
  209. if tf >= frame then
  210. if allowframeloss then
  211. script.Heartbeat:Fire()
  212. lastframe = tick()
  213. else
  214. for i = 1, math.floor(tf / frame) do
  215. script.Heartbeat:Fire()
  216. end
  217. lastframe = tick()
  218. end
  219. if tossremainder then
  220. tf = 0
  221. else
  222. tf = tf - frame * math.floor(tf / frame)
  223. end
  224. end
  225. end)
  226. function swait(num)
  227. if num == 0 or num == nil then
  228. ArtificialHB.Event:wait()
  229. else
  230. for i = 0, num do
  231. ArtificialHB.Event:wait()
  232. end
  233. end
  234. end
  235.  
  236. function RemoveOutlines(part)
  237. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  238. end
  239.  
  240. sndid = "rbxassetid://176322684"
  241. sndpi = .7
  242. saun = Instance.new("Sound",Head)
  243. saun.Volume = 1
  244. saun.Pitch = sndpi
  245. saun.SoundId = sndid
  246. saun.Name = "a"
  247. saun.Looped = true
  248. saun:Play()
  249.  
  250. dant = 0
  251.  
  252. Mouse.KeyDown:connect(function(key)
  253. key=key:lower()
  254. if key=="e" then
  255. if dant == 0 then
  256. dant = 1
  257. sndid = "rbxassetid://448668887"
  258. sndpi = 1
  259. elseif dant == 1 then
  260. dant = 0
  261. sndid = "rbxassetid://176322684"
  262. sndpi = .7
  263. end
  264. saun.Pitch = sndpi
  265. saun.SoundId = sndid
  266. saun:Play()
  267. end
  268. end)
  269.  
  270. while true do
  271. if Head:FindFirstChild("a")==nil then
  272. saun = Instance.new("Sound",Head)
  273. saun.Volume = 1
  274. saun.Pitch = sndpi
  275. saun.SoundId = sndid
  276. saun.Name = "a"
  277. saun.Looped = true
  278. saun:Play()
  279. end
  280. if dant == 0 then
  281. for i = 0, 1, 0.25 do
  282. swait()
  283. PlayAnimationFromTable({
  284. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  285. CFrame.new(0, 1.4999938, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  286. 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),
  287. 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),
  288. CFrame.new(0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  289. CFrame.new(-0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  290. }, .5, false)
  291. end
  292. for i = 0, 1, 0.25 do
  293. swait()
  294. PlayAnimationFromTable({
  295. CFrame.new(-0.268402338, -0.187939167, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736, 0, 0, 0, 1),
  296. CFrame.new(-0.409892142, 1.36144388, 0, 0.766044796, -0.642787218, 0, 0.642787218, 0.766044855, 0, 0, 0, 1),
  297. 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),
  298. 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),
  299. CFrame.new(0.951213062, -1.54518354, 0, 0.866025686, -0.499999642, 0, 0.499999642, 0.866025686, 0, 0, 0, 1),
  300. CFrame.new(0.214191973, -1.8503952, 0, 0.766044796, -0.642787218, 0, 0.642787218, 0.766044855, 0, 0, 0, 1),
  301. }, .5, false)
  302. end
  303. for i = 0, 1, 0.25 do
  304. swait()
  305. PlayAnimationFromTable({
  306. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  307. CFrame.new(0, 1.4999938, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  308. 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),
  309. 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),
  310. CFrame.new(0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  311. CFrame.new(-0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  312. }, .5, false)
  313. end
  314. for i = 0, 1, 0.25 do
  315. swait()
  316. PlayAnimationFromTable({
  317. CFrame.new(0.268400908, -0.187940732, 0, 0.939692855, -0.342019945, 0, 0.342019975, 0.939692795, 0, 0, 0, 1),
  318. CFrame.new(0.409947664, 1.36144304, 0, 0.766039729, 0.642798781, 0, -0.642787337, 0.766043961, 0, 0, 0, 1),
  319. 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),
  320. 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),
  321. CFrame.new(-0.214235365, -1.8503921, 0, 0.766041398, 0.64279145, 0, -0.64279151, 0.766041279, 0, 0, 0, 1),
  322. CFrame.new(-0.965987146, -1.57677674, 0, 0.866024733, 0.500001609, 0, -0.500001609, 0.866024613, 0, 0, 0, 1),
  323. }, .5, false)
  324. end
  325. elseif dant == 1 then
  326. for i = 0, 1, 0.1 do
  327. swait()
  328. PlayAnimationFromTable({
  329. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  330. CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  331. CFrame.new(1.09999847, 1.1920929e-07, -0.600001514, 0, 0, 1, 0.173647985, 0.984807849, 0, -0.984807849, 0.173647985, 0),
  332. CFrame.new(-1.09999847, 1.1920929e-07, -0.600001514, 0, 0, -1, -0.173647985, 0.984807849, 0, 0.984807849, 0.173647985, 0),
  333. CFrame.new(0.5, -1.99999881, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  334. CFrame.new(-0.5, -1.99999881, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  335. }, .2, false)
  336. end
  337. for i = 0, 1, 0.1 do
  338. swait()
  339. PlayAnimationFromTable({
  340. CFrame.new(-0.0436433926, 0, -0.113613628, 0.64278698, 0, -0.766044974, 0, 1, 0, 0.766044974, 0, 0.64278698),
  341. CFrame.new(0, 1.49999809, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  342. CFrame.new(1.09998989, 1, -0.599998474, 0, 0, 1, 1, 0, 0, 0, 1, 0),
  343. CFrame.new(-1.10000229, 1, -0.599998474, 0, 0, -1, -1, 0, 0, 0, 1, 0),
  344. CFrame.new(0.499988556, -1.99999797, -3.81469727e-06, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  345. CFrame.new(-0.500012398, -1.78038144, -0.819608092, 1, 0, 1.49011612e-08, 0, 0.499999046, -0.866025984, 0, 0.866026044, 0.499999046),
  346. }, .2, false)
  347. end
  348. for i = 0, 1, 0.1 do
  349. swait()
  350. PlayAnimationFromTable({
  351. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  352. CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  353. CFrame.new(1.09999847, 1.1920929e-07, -0.600001514, 0, 0, 1, 0.173647985, 0.984807849, 0, -0.984807849, 0.173647985, 0),
  354. CFrame.new(-1.09999847, 1.1920929e-07, -0.600001514, 0, 0, -1, -0.173647985, 0.984807849, 0, 0.984807849, 0.173647985, 0),
  355. CFrame.new(0.5, -1.99999881, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  356. CFrame.new(-0.5, -1.99999881, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  357. }, .2, false)
  358. end
  359. for i = 0, 1, 0.1 do
  360. swait()
  361. PlayAnimationFromTable({
  362. CFrame.new(0.261404335, 0, -0.167939946, 0.76604414, 0, 0.642788053, 0, 1, 0, -0.642788053, 0, 0.76604414),
  363. CFrame.new(0, 1.49999285, 0, 1.00000012, 0, 0, 0, 1, 0, 0, 0, 1.00000012),
  364. CFrame.new(1.10000622, 0.999999046, -0.599996626, 0, 0, 1.00000012, 1, 0, 0, 0, 1.00000012, 0),
  365. CFrame.new(-1.09999859, 0.999999046, -0.59999758, 0, 0, -1.00000012, -1, 0, 0, 0, 1.00000012, 0),
  366. 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),
  367. CFrame.new(-0.500003874, -1.99999893, 3.81469772e-06, 1.00000012, 0, 0, 0, 1, 0, 0, 0, 1.00000012),
  368. }, .2, false)
  369. end
  370. end
  371. end
Add Comment
Please, Sign In to add comment