metilol

Untitled

Feb 22nd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.80 KB | None | 0 0
  1. game.Players.PlayerAdded:Connect(function(player)
  2. Player.Chatted:Connect(function(message)
  3. if sound.IsPlaying == false then
  4. if message == "Sugarie Saffron!" then
  5. Effects = { }
  6. local Player = game:service'Players'.localPlayer
  7. local chara = Player.Character
  8. local Humanoid = chara:FindFirstChildOfClass("Humanoid")
  9. local Mouse = Player:GetMouse()
  10. local LeftArm = chara["Left Arm"]
  11. local RightArm = chara["Right Arm"]
  12. local LeftLeg = chara["Left Leg"]
  13. local RightLeg = chara["Right Leg"]
  14. local Head = chara.Head
  15. local Torso = chara.Torso
  16. local Camera = game.Workspace.CurrentCamera
  17. local RootPart = chara.HumanoidRootPart
  18. local RootJoint = RootPart.RootJoint
  19. local attack = false
  20. local Anim = 'Idle'
  21. local attacktype = 1
  22. local delays = false
  23. local play = true
  24. local targetted = nil
  25. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  26. local velocity = RootPart.Velocity.y
  27. local sine = 0
  28. local change = 1
  29. local doe = 0
  30. local Create = LoadLibrary("RbxUtility").Create
  31. Humanoid.WalkSpeed = 2
  32.  
  33. Humanoid.Animator.Parent = nil
  34. chara.Animate.Parent = nil
  35.  
  36. local newMotor = function(part0, part1, c0, c1)
  37. local w = Create('Motor'){
  38. Parent = part0,
  39. Part0 = part0,
  40. Part1 = part1,
  41. C0 = c0,
  42. C1 = c1,
  43. }
  44. return w
  45. end
  46.  
  47. function clerp(a, b, t)
  48. return a:lerp(b, t)
  49. end
  50.  
  51. RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  52. NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  53.  
  54. local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0))
  55. local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
  56. local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
  57. local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
  58. RootJoint.C1 = CFrame.new(0, 0, 0)
  59. RootJoint.C0 = CFrame.new(0, 0, 0)
  60. Torso.Neck.C1 = CFrame.new(0, 0, 0)
  61. Torso.Neck.C0 = CFrame.new(0, 1.5, 0)
  62.  
  63. local rarmc1 = RW.C1
  64. local larmc1 = LW.C1
  65. local rlegc1 = RH.C1
  66. local llegc1 = LH.C1
  67.  
  68. local resetc1 = false
  69.  
  70. function PlayAnimationFromTable(table, speed, bool)
  71. RootJoint.C0 = clerp(RootJoint.C0, table[1], speed)
  72. Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed)
  73. RW.C0 = clerp(RW.C0, table[3], speed)
  74. LW.C0 = clerp(LW.C0, table[4], speed)
  75. RH.C0 = clerp(RH.C0, table[5], speed)
  76. LH.C0 = clerp(LH.C0, table[6], speed)
  77. if bool == true then
  78. if resetc1 == false then
  79. resetc1 = true
  80. RootJoint.C1 = RootJoint.C1
  81. Torso.Neck.C1 = Torso.Neck.C1
  82. RW.C1 = rarmc1
  83. LW.C1 = larmc1
  84. RH.C1 = rlegc1
  85. LH.C1 = llegc1
  86. end
  87. end
  88. end
  89.  
  90. ArtificialHB = Instance.new("BindableEvent", script)
  91. ArtificialHB.Name = "Heartbeat"
  92. script:WaitForChild("Heartbeat")
  93. frame = 0.03333333333333
  94. tf = 0
  95. allowframeloss = false
  96. tossremainder = false
  97. lastframe = tick()
  98. script.Heartbeat:Fire()
  99. game:GetService("RunService").Heartbeat:connect(function(s, p)
  100. tf = tf + s
  101. if tf >= frame then
  102. if allowframeloss then
  103. script.Heartbeat:Fire()
  104. lastframe = tick()
  105. else
  106. for i = 1, math.floor(tf / frame) do
  107. script.Heartbeat:Fire()
  108. end
  109. lastframe = tick()
  110. end
  111. if tossremainder then
  112. tf = 0
  113. else
  114. tf = tf - frame * math.floor(tf / frame)
  115. end
  116. end
  117. end)
  118. function swait(num)
  119. if num == 0 or num == nil then
  120. ArtificialHB.Event:wait()
  121. else
  122. for i = 0, num do
  123. ArtificialHB.Event:wait()
  124. end
  125. end
  126. end
  127.  
  128. function RemoveOutlines(part)
  129. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  130. end
  131.  
  132. sndid = "rbxassetid://176322684"
  133. sndpi = .7
  134. saun = Instance.new("Sound",Head)
  135. saun.Volume = 1
  136. saun.Pitch = sndpi
  137. saun.SoundId = sndid
  138. saun.Name = "a"
  139. saun.Looped = true
  140. saun:Play()
  141.  
  142. dant = 0
  143.  
  144. Mouse.KeyDown:connect(function(key)
  145. key=key:lower()
  146. if key=="e" then
  147. if dant == 0 then
  148. dant = 1
  149. sndid = "rbxassetid://448668887"
  150. sndpi = 1
  151. elseif dant == 1 then
  152. dant = 0
  153. sndid = "rbxassetid://176322684"
  154. sndpi = .7
  155. end
  156. saun.Pitch = sndpi
  157. saun.SoundId = sndid
  158. saun:Play()
  159. end
  160. end)
  161.  
  162. while true do
  163. if Head:FindFirstChild("a")==nil then
  164. saun = Instance.new("Sound",Head)
  165. saun.Volume = 1
  166. saun.Pitch = sndpi
  167. saun.SoundId = sndid
  168. saun.Name = "a"
  169. saun.Looped = true
  170. saun:Play()
  171. end
  172. if dant == 0 then
  173. for i = 0, 1, 0.25 do
  174. swait()
  175. PlayAnimationFromTable({
  176. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  177. CFrame.new(0, 1.4999938, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  178. 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),
  179. 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),
  180. CFrame.new(0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  181. CFrame.new(-0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  182. }, .5, false)
  183. end
  184. for i = 0, 1, 0.25 do
  185. swait()
  186. PlayAnimationFromTable({
  187. CFrame.new(-0.268402338, -0.187939167, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736, 0, 0, 0, 1),
  188. CFrame.new(-0.409892142, 1.36144388, 0, 0.766044796, -0.642787218, 0, 0.642787218, 0.766044855, 0, 0, 0, 1),
  189. 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),
  190. 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),
  191. CFrame.new(0.951213062, -1.54518354, 0, 0.866025686, -0.499999642, 0, 0.499999642, 0.866025686, 0, 0, 0, 1),
  192. CFrame.new(0.214191973, -1.8503952, 0, 0.766044796, -0.642787218, 0, 0.642787218, 0.766044855, 0, 0, 0, 1),
  193. }, .5, false)
  194. end
  195. for i = 0, 1, 0.25 do
  196. swait()
  197. PlayAnimationFromTable({
  198. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  199. CFrame.new(0, 1.4999938, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  200. 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),
  201. 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),
  202. CFrame.new(0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  203. CFrame.new(-0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  204. }, .5, false)
  205. end
  206. for i = 0, 1, 0.25 do
  207. swait()
  208. PlayAnimationFromTable({
  209. CFrame.new(0.268400908, -0.187940732, 0, 0.939692855, -0.342019945, 0, 0.342019975, 0.939692795, 0, 0, 0, 1),
  210. CFrame.new(0.409947664, 1.36144304, 0, 0.766039729, 0.642798781, 0, -0.642787337, 0.766043961, 0, 0, 0, 1),
  211. 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),
  212. 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),
  213. CFrame.new(-0.214235365, -1.8503921, 0, 0.766041398, 0.64279145, 0, -0.64279151, 0.766041279, 0, 0, 0, 1),
  214. CFrame.new(-0.965987146, -1.57677674, 0, 0.866024733, 0.500001609, 0, -0.500001609, 0.866024613, 0, 0, 0, 1),
  215. }, .5, false)
  216. end
  217. elseif dant == 1 then
  218. for i = 0, 1, 0.1 do
  219. swait()
  220. PlayAnimationFromTable({
  221. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  222. CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  223. CFrame.new(1.09999847, 1.1920929e-07, -0.600001514, 0, 0, 1, 0.173647985, 0.984807849, 0, -0.984807849, 0.173647985, 0),
  224. CFrame.new(-1.09999847, 1.1920929e-07, -0.600001514, 0, 0, -1, -0.173647985, 0.984807849, 0, 0.984807849, 0.173647985, 0),
  225. CFrame.new(0.5, -1.99999881, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  226. CFrame.new(-0.5, -1.99999881, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  227. }, .2, false)
  228. end
  229. for i = 0, 1, 0.1 do
  230. swait()
  231. PlayAnimationFromTable({
  232. CFrame.new(-0.0436433926, 0, -0.113613628, 0.64278698, 0, -0.766044974, 0, 1, 0, 0.766044974, 0, 0.64278698),
  233. CFrame.new(0, 1.49999809, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  234. CFrame.new(1.09998989, 1, -0.599998474, 0, 0, 1, 1, 0, 0, 0, 1, 0),
  235. CFrame.new(-1.10000229, 1, -0.599998474, 0, 0, -1, -1, 0, 0, 0, 1, 0),
  236. CFrame.new(0.499988556, -1.99999797, -3.81469727e-06, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  237. CFrame.new(-0.500012398, -1.78038144, -0.819608092, 1, 0, 1.49011612e-08, 0, 0.499999046, -0.866025984, 0, 0.866026044, 0.499999046),
  238. }, .2, false)
  239. end
  240. for i = 0, 1, 0.1 do
  241. swait()
  242. PlayAnimationFromTable({
  243. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  244. CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  245. CFrame.new(1.09999847, 1.1920929e-07, -0.600001514, 0, 0, 1, 0.173647985, 0.984807849, 0, -0.984807849, 0.173647985, 0),
  246. CFrame.new(-1.09999847, 1.1920929e-07, -0.600001514, 0, 0, -1, -0.173647985, 0.984807849, 0, 0.984807849, 0.173647985, 0),
  247. CFrame.new(0.5, -1.99999881, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  248. CFrame.new(-0.5, -1.99999881, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  249. }, .2, false)
  250. end
  251. for i = 0, 1, 0.1 do
  252. swait()
  253. PlayAnimationFromTable({
  254. CFrame.new(0.261404335, 0, -0.167939946, 0.76604414, 0, 0.642788053, 0, 1, 0, -0.642788053, 0, 0.76604414),
  255. CFrame.new(0, 1.49999285, 0, 1.00000012, 0, 0, 0, 1, 0, 0, 0, 1.00000012),
  256. CFrame.new(1.10000622, 0.999999046, -0.599996626, 0, 0, 1.00000012, 1, 0, 0, 0, 1.00000012, 0),
  257. CFrame.new(-1.09999859, 0.999999046, -0.59999758, 0, 0, -1.00000012, -1, 0, 0, 0, 1.00000012, 0),
  258. 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),
  259. CFrame.new(-0.500003874, -1.99999893, 3.81469772e-06, 1.00000012, 0, 0, 0, 1, 0, 0, 0, 1.00000012),
  260. }, .2, false)
  261.  
  262. end
  263. end
  264. end
Add Comment
Please, Sign In to add comment