Advertisement
Guest User

Untitled

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