Advertisement
EdgyHedgehog

Bomb.

Dec 23rd, 2018
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.78 KB | None | 0 0
  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. --[[qaeo baeo haeo]]--
  87. wait(1 / 60)
  88. Effects = { }
  89. local Player = owner
  90. local Character = Player.Character
  91. local Humanoid = Character.Humanoid
  92. local m = Instance.new('Model', Character)
  93. m.Name = "WeaponModel"
  94. Character["Left Arm"]:remove()
  95. Character["Right Arm"]:remove()
  96. Character["Left Leg"]:remove()
  97. Character["Right Leg"]:remove()
  98. local Head = Character.Head
  99. local Torso = Character.Torso
  100. local cam = game.Workspace.CurrentCamera
  101. local RootPart = Character.HumanoidRootPart
  102. local RootJoint = RootPart.RootJoint
  103. local equipped = false
  104. local attack = false
  105. local Anim = 'Idle'
  106. local idle = 0
  107. local attacktype = 1
  108. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  109. local velocity = RootPart.Velocity.y
  110. local sine = 0
  111. local change = 1
  112. local mana = 0
  113. local it =Instance.new
  114. vt=Vector3.new
  115. local grabbed = false
  116. local cf = CFrame.new
  117. local mr = math.rad
  118. local angles = CFrame.Angles
  119. local ud = UDim2.new
  120. local c3 = Color3.new
  121. for i,v in pairs(Character:GetChildren()) do
  122. if v:IsA("Accessory") then
  123. v:Destroy()
  124. end
  125. end
  126. local NeckCF = cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  127. Humanoid.Animator:Destroy()
  128. Character.Animate:Destroy()
  129. Head.Transparency = 1
  130. Torso.Transparency = 1
  131. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  132. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  133. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  134.  
  135. Head.face:remove()
  136. function clerp(a, b, t)
  137. return a:lerp(b, t)
  138. end
  139.  
  140.  
  141. local RbxUtility = LoadLibrary("RbxUtility")
  142. local Create = RbxUtility.Create
  143.  
  144. function RemoveOutlines(part)
  145. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  146. end
  147.  
  148. function CreatePart(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  149. local Part = Create("Part"){
  150. Parent = Parent,
  151. Reflectance = Reflectance,
  152. Transparency = Transparency,
  153. CanCollide = false,
  154. Locked = true,
  155. BrickColor = BrickColor.new(tostring(BColor)),
  156. Name = Name,
  157. Size = Size,
  158. Material = Material,
  159. }
  160. RemoveOutlines(Part)
  161. return Part
  162. end
  163.  
  164. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  165. local Msh = Create(Mesh){
  166. Parent = Part,
  167. Offset = OffSet,
  168. Scale = Scale,
  169. }
  170. if Mesh == "SpecialMesh" then
  171. Msh.MeshType = MeshType
  172. Msh.MeshId = MeshId
  173. end
  174. return Msh
  175. end
  176.  
  177. --[[Credits to SazErenos for his Artificial Heartbeat]]--
  178.  
  179. ArtificialHB = Instance.new("BindableEvent", script)
  180. ArtificialHB.Name = "Heartbeat"
  181.  
  182. script:WaitForChild("Heartbeat")
  183.  
  184. frame = 1 / 30
  185. tf = 0
  186. allowframeloss = false
  187. tossremainder = false
  188. lastframe = tick()
  189. script.Heartbeat:Fire()
  190.  
  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.  
  211. function swait(num)
  212. if num == 0 or num == nil then
  213. ArtificialHB.Event:wait()
  214. else
  215. for i = 0, num do
  216. ArtificialHB.Event:wait()
  217. end
  218. end
  219. end
  220.  
  221.  
  222. function CreateWeld(Parent, Part0, Part1, C0, C1)
  223. local Weld = Create("Weld"){
  224. Parent = Parent,
  225. Part0 = Part0,
  226. Part1 = Part1,
  227. C0 = C0,
  228. C1 = C1,
  229. }
  230. return Weld
  231. end
  232.  
  233. function rayCast(Position, Direction, Range, Ignore)
  234. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  235. end
  236.  
  237. function CreateSound(id, par, vol, pit)
  238. coroutine.resume(coroutine.create(function()
  239. local sou = Instance.new("Sound", par or workspace)
  240. sou.Volume = vol
  241. sou.Pitch = pit or 1
  242. sou.SoundId = id
  243. swait()
  244. sou:play()
  245. game:GetService("Debris"):AddItem(sou, 6)
  246. end))
  247. end
  248.  
  249.  
  250. Handle=CreatePart(m,Enum.Material.Plastic,0.10000000149012,0,"Really black","Handle",Vector3.new(1, 1, 1))
  251. HandleWeld=CreateWeld(m,Character["Torso"],Handle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.0199661255, -0.0400784016, 0.15832901, 1, -5.67096185e-006, -2.38577304e-005, 5.6816225e-006, 0.999999344, 0.000446140766, 2.38577395e-005, -0.000446140766, 0.999999344))
  252. Tock=CreatePart(m,Enum.Material.Plastic,0,0,"Medium stone grey","Tock",Vector3.new(1, 1, 1))
  253. TockWeld=CreateWeld(m,Handle,Tock,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-3.81469727e-006, -0.699996948, 7.00950623e-005, 1, 2.04636308e-011, 7.80528353e-008, -7.29414751e-008, 1.35121719e-010, 0.999998868, -2.04636308e-011, -0.999998868, -1.35550668e-010))
  254. CreateMesh("CylinderMesh",Tock,"","",Vector3.new(0, 0, 0),Vector3.new(0.150000006, 0.75, 1))
  255. Tick=CreatePart(m,Enum.Material.Plastic,0,0,"Medium stone grey","Tick",Vector3.new(1, 1, 1))
  256. TickWeld=CreateWeld(m,Tock,Tick,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.300003052, 0.200067759, 0, 7.80528353e-008, 0.999998868, -1.35550668e-010, 2.04636308e-011, 1.35121719e-010, -0.999998868, -1, 7.29414751e-008, 2.04636308e-011))
  257. CreateMesh("SpecialMesh",Tick,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(0.400000006, 0.400000006, 1.20000005))
  258. Tick=CreatePart(m,Enum.Material.Plastic,0,0,"Medium stone grey","Tick",Vector3.new(1, 1, 1))
  259. TickWeld=CreateWeld(m,Tock,Tick,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.300003052, -0.199929476, -3.81469727e-006, 7.80528353e-008, 0.999998868, -1.35550668e-010, 2.04636308e-011, 1.35121719e-010, -0.999998868, -1, 7.29414751e-008, 2.04636308e-011))
  260. CreateMesh("SpecialMesh",Tick,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(0.400000006, 0.400000006, 1.20000005))
  261. CreateMesh("SpecialMesh",Handle,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1.5, 1.5, 1.5))
  262. Part=CreatePart(m,Enum.Material.Plastic,0,0,"Institutional white","Part",Vector3.new(0.540000021, 0.200000003, 0.460000038))
  263. PartWeld=CreateWeld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.0200805664, -0.737700462, 0, -2.19000867e-007, -0.422617674, 0.906307518, -2.3091161e-007, 0.906307518, 0.422617704, -1, -1.16742285e-007, -2.98621671e-007))
  264. CreateMesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  265. LeftPeg=CreatePart(m,Enum.Material.Plastic,0,0,"Bright yellow","LeftPeg",Vector3.new(1, 0.560000002, 1))
  266. LeftPegWeld=CreateWeld(m,Handle,LeftPeg,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.399997711, 0.779884815, 7.62939453e-006, 1, -4.36907612e-008, -4.11564542e-008, 4.372896e-008, 0.999999404, 1.54743116e-008, 4.62659955e-008, -1.53474389e-008, 0.999999404))
  267. CreateMesh("SpecialMesh",LeftPeg,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(0.800000012, 0.75, 0.949999988))
  268. Part=CreatePart(m,Enum.Material.Plastic,0.10000000149012,0,"Institutional white","Part",Vector3.new(0.200000003, 1.13999999, 0.590000033))
  269. PartWeld=CreateWeld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.219978333, -0.00736188889, 0.492553711, 1, 5.67091502e-006, -1.42244971e-007, -5.44018985e-006, 0.965925276, 0.258818746, 1.60760464e-006, -0.258818775, 0.965925276))
  270. CreateMesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 0.649999976, 1))
  271. Part=CreatePart(m,Enum.Material.Plastic,0.10000000149012,0,"Institutional white","Part",Vector3.new(0.200000003, 1.13999999, 0.590000033))
  272. PartWeld=CreateWeld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.189998627, -0.00735902786, 0.49256134, 1, 5.67091502e-006, -1.42244971e-007, -5.44018985e-006, 0.965925276, 0.258818746, 1.60760464e-006, -0.258818775, 0.965925276))
  273. CreateMesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 0.649999976, 1))
  274. Poot=CreatePart(m,Enum.Material.Plastic,0,0,"Mid gray","Part",Vector3.new(0.200000003, 0.219999999, 0.200000003))
  275. PartWeld=CreateWeld(m,Handle,Poot,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.502023697, -1.00622749, 0, -9.02868123e-006, -0.81915164, 0.573576152, 2.20012589e-006, 0.573576152, 0.81915164, -1, 8.65777929e-006, -3.37895472e-006))
  276. CreateMesh("CylinderMesh",Poot,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.5))
  277. Part=CreatePart(m,Enum.Material.Plastic,0,0,"Mid gray","Part",Vector3.new(0.200000003, 0.219999999, 0.200000003))
  278. PartWeld=CreateWeld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.0188560486, -0.944825172, 0, -1.92190091e-005, -0.422617674, 0.906307518, 1.27690937e-005, 0.906307518, 0.422617704, -1, 1.96949968e-005, -1.20244413e-005))
  279. CreateMesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.5))
  280. RightPeg=CreatePart(m,Enum.Material.Plastic,0,0,"Bright yellow","RightPeg",Vector3.new(1, 0.570000052, 1))
  281. RightPegWeld=CreateWeld(m,Handle,RightPeg,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.400005341, 0.784877062, 1.14440918e-005, 1, -4.36907612e-008, -4.11564542e-008, 4.372896e-008, 0.999999404, 1.54743116e-008, 4.62659955e-008, -1.53474389e-008, 0.999999404))
  282. CreateMesh("SpecialMesh",RightPeg,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(0.800000012, 0.75, 0.949999988))
  283. Part=CreatePart(m,Enum.Material.Plastic,0,0,"Mid gray","Part",Vector3.new(0.200000003, 0.219999999, 0.200000003))
  284. PartWeld=CreateWeld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.853747368, -0.98065567, 3.81469727e-006, -4.15784598e-008, -0.965925038, 0.258818835, 1.37861207e-008, 0.258818835, 0.965925038, -1, 4.36907612e-008, -2.55568011e-009))
  285. CreateMesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.5))
  286.  
  287. function boom()
  288. attack = true
  289. d=Instance.new("Fire",Poot)
  290. d.Heat=0
  291. d.Size=2
  292. CreateSound("http://www.roblox.com/asset/?id=138931042",Torso,1,1)
  293. for i = 0, 1, 0.05 do
  294. swait()
  295. if Torsovelocity > 2 then
  296. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  297. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  298. else
  299. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  300. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  301. end
  302. Handle.BrickColor=BrickColor.new("Bright red")
  303. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  304. end
  305. for i = 0, 1, 0.05 do
  306. swait()
  307. if Torsovelocity > 2 then
  308. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  309. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  310. else
  311. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  312. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  313. end
  314. Handle.BrickColor=BrickColor.new("Black")
  315. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  316. end
  317. for i = 0, 1, 0.1 do
  318. swait()
  319. if Torsovelocity > 2 then
  320. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  321. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  322. else
  323. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  324. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  325. end
  326. Handle.BrickColor=BrickColor.new("Bright red")
  327. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  328. end
  329. for i = 0, 1, 0.1 do
  330. swait()
  331. if Torsovelocity > 2 then
  332. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  333. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  334. else
  335. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  336. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  337. end
  338. Handle.BrickColor=BrickColor.new("Black")
  339. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  340. end
  341. for i = 0, 1, 0.2 do
  342. swait()
  343. if Torsovelocity > 2 then
  344. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  345. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  346. else
  347. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  348. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  349. end
  350. Handle.BrickColor=BrickColor.new("Bright red")
  351. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  352. end
  353. for i = 0, 1, 0.2 do
  354. swait()
  355. if Torsovelocity > 2 then
  356. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  357. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  358. else
  359. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  360. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  361. end
  362. Handle.BrickColor=BrickColor.new("Black")
  363. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  364. end
  365. for i = 0, 1, 0.5 do
  366. swait()
  367. if Torsovelocity > 2 then
  368. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  369. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  370. else
  371. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  372. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  373. end
  374. Handle.BrickColor=BrickColor.new("Bright red")
  375. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  376. end
  377. for i = 0, 1, 0.5 do
  378. swait()
  379. if Torsovelocity > 2 then
  380. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  381. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  382. else
  383. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  384. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  385. end
  386. Handle.BrickColor=BrickColor.new("Black")
  387. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  388. end
  389. for i = 0, 1, 0.5 do
  390. swait()
  391. if Torsovelocity > 2 then
  392. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  393. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  394. else
  395. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  396. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  397. end
  398. Handle.BrickColor=BrickColor.new("Bright red")
  399. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  400. end
  401. for i = 0, 1, 0.5 do
  402. swait()
  403. if Torsovelocity > 2 then
  404. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  405. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  406. else
  407. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  408. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  409. end
  410. Handle.BrickColor=BrickColor.new("Black")
  411. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  412. end
  413. CreateSound("http://www.roblox.com/asset/?id=282185588",Torso,1,1)
  414. gg=Instance.new("Explosion")
  415. gg.Parent=Torso
  416. gg.Position=Torso.Position
  417. attack = false
  418. end
  419.  
  420. --[[Attacks]]--
  421.  
  422. mouse.Button1Down:connect(function()
  423. if attack == false and attacktype == 1 then
  424. boom()
  425. end
  426. end)
  427.  
  428.  
  429. Humanoid.WalkSpeed=10
  430. --[[ Movement Detection ]]--
  431. j=1
  432. while true do
  433. swait()
  434. if j == 360 then
  435. j=1
  436. else
  437. j=j+5
  438. end
  439. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  440. velocity = RootPart.Velocity.y
  441. sine = sine + change
  442. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
  443. if equipped == true or equipped == false then
  444. if RootPart.Velocity.y > 1 and hit == nil then
  445. Anim = "Jump"
  446. if attack == false then
  447.  
  448. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  449. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  450. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  451. end
  452. elseif RootPart.Velocity.y < -1 and hit == nil then
  453. Anim = "Fall"
  454. if attack == false then
  455.  
  456. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  457. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  458. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  459. end
  460. elseif Torsovelocity < 1 and hit ~= nil then
  461. Anim = "Idle"
  462. if attack == false then
  463. change = 1
  464. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  465. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  466. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  467. end
  468. elseif Torsovelocity > 2 and hit ~= nil then
  469. Anim = "Walk"
  470. if attack == false then
  471. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  472. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  473. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  474. end
  475. end
  476. end
  477. if #Effects > 0 then
  478. for e = 1, #Effects do
  479. if Effects[e] ~= nil then
  480. local Thing = Effects[e]
  481. if Thing ~= nil then
  482. local Part = Thing[1]
  483. local Mode = Thing[2]
  484. local Delay = Thing[3]
  485. local IncX = Thing[4]
  486. local IncY = Thing[5]
  487. local IncZ = Thing[6]
  488. if Thing[1].Transparency <= 1 then
  489. if Thing[2] == "Block1" then
  490. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  491. Mesh = Thing[1].Mesh
  492. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  493. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  494. elseif Thing[2] == "Block2" then
  495. Thing[1].CFrame = Thing[1].CFrame
  496. Mesh = Thing[7]
  497. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  498. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  499. elseif Thing[2] == "Cylinder" then
  500. Mesh = Thing[1].Mesh
  501. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  502. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  503. elseif Thing[2] == "Blood" then
  504. Mesh = Thing[7]
  505. Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, .5, 0)
  506. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  507. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  508. elseif Thing[2] == "Elec" then
  509. Mesh = Thing[1].Mesh
  510. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  511. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  512. elseif Thing[2] == "Disappear" then
  513. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  514. elseif Thing[2] == "Shatter" then
  515. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  516. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  517. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  518. Thing[6] = Thing[6] + Thing[5]
  519. end
  520. else
  521. Part.Parent = nil
  522. table.remove(Effects, e)
  523. end
  524. end
  525. end
  526. end
  527. end
  528. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement