Advertisement
Guest User

Untitled

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