Advertisement
aaaay63746

meme meme meme

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