PasterXIV

Untitled

Nov 15th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.97 KB | None | 0 0
  1.  
  2. --https://github.com/Mokiros/roblox-FE-compatibility
  3. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  4. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  5. local RealPlayer = Player
  6. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},Soundscape=r:GetService("RunService").Heartbeat,BindToSoundscape=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
  7.  
  8. --[[qaeo baeo haeo]]--
  9. wait(1 / 60)
  10. Effects = { }
  11. local Player = game.Players.localPlayer
  12. local Character = Player.Character
  13. local Humanoid = Character.Humanoid
  14. local mouse = Player:GetMouse()
  15. local m = Instance.new('Model', Character)
  16. m.Name = "WeaponModel"
  17. Character["Left Arm"]:remove()
  18. Character["Right Arm"]:remove()
  19. Character["Left Leg"]:remove()
  20. Character["Right Leg"]:remove()
  21. local Head = Character.Head
  22. local Torso = Character.Torso
  23. local cam = game.Workspace.CurrentCamera
  24. local RootPart = Character.HumanoidRootPart
  25. local RootJoint = RootPart.RootJoint
  26. local equipped = false
  27. local attack = false
  28. local Anim = 'Idle'
  29. local idle = 0
  30. local attacktype = 1
  31. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  32. local velocity = RootPart.Velocity.y
  33. local sine = 0
  34. local change = 1
  35. local mana = 0
  36. local it =Instance.new
  37. vt=Vector3.new
  38. local grabbed = false
  39. local cf = CFrame.new
  40. local mr = math.rad
  41. local angles = CFrame.Angles
  42. local ud = UDim2.new
  43. local c3 = Color3.new
  44. for i,v in pairs(Character:GetChildren()) do
  45. if v:IsA("Accessory") then
  46. v:Destroy()
  47. end
  48. end
  49. local NeckCF = cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  50. Humanoid.Animator:Destroy()
  51. Character.Animate:Destroy()
  52. Head.Transparency = 1
  53. Torso.Transparency = 1
  54. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  55. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  56. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  57.  
  58. Head.face:remove()
  59. function clerp(a, b, t)
  60. return a:lerp(b, t)
  61. end
  62.  
  63.  
  64. local RbxUtility = LoadLibrary("RbxUtility")
  65. local Create = RbxUtility.Create
  66.  
  67. function RemoveOutlines(part)
  68. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  69. end
  70.  
  71. function CreatePart(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  72. local Part = Create("Part"){
  73. Parent = Parent,
  74. Reflectance = Reflectance,
  75. Transparency = Transparency,
  76. CanCollide = false,
  77. Locked = true,
  78. BrickColor = BrickColor.new(tostring(BColor)),
  79. Name = Name,
  80. Size = Size,
  81. Material = Material,
  82. }
  83. RemoveOutlines(Part)
  84. return Part
  85. end
  86.  
  87. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  88. local Msh = Create(Mesh){
  89. Parent = Part,
  90. Offset = OffSet,
  91. Scale = Scale,
  92. }
  93. if Mesh == "SpecialMesh" then
  94. Msh.MeshType = MeshType
  95. Msh.MeshId = MeshId
  96. end
  97. return Msh
  98. end
  99.  
  100. --[[Credits to SazErenos for his Artificial Heartbeat]]--
  101.  
  102. ArtificialHB = Instance.new("BindableEvent", script)
  103. ArtificialHB.Name = "Heartbeat"
  104.  
  105. script:WaitForChild("Heartbeat")
  106.  
  107. frame = 1 / 30
  108. tf = 0
  109. allowframeloss = false
  110. tossremainder = false
  111. lastframe = tick()
  112. script.Heartbeat:Fire()
  113.  
  114. game:GetService("RunService").Heartbeat:connect(function(s, p)
  115. tf = tf + s
  116. if tf >= frame then
  117. if allowframeloss then
  118. script.Heartbeat:Fire()
  119. lastframe = tick()
  120. else
  121. for i = 1, math.floor(tf / frame) do
  122. script.Heartbeat:Fire()
  123. end
  124. lastframe = tick()
  125. end
  126. if tossremainder then
  127. tf = 0
  128. else
  129. tf = tf - frame * math.floor(tf / frame)
  130. end
  131. end
  132. end)
  133.  
  134. function swait(num)
  135. if num == 0 or num == nil then
  136. ArtificialHB.Event:wait()
  137. else
  138. for i = 0, num do
  139. ArtificialHB.Event:wait()
  140. end
  141. end
  142. end
  143.  
  144.  
  145. function CreateWeld(Parent, Part0, Part1, C0, C1)
  146. local Weld = Create("Weld"){
  147. Parent = Parent,
  148. Part0 = Part0,
  149. Part1 = Part1,
  150. C0 = C0,
  151. C1 = C1,
  152. }
  153. return Weld
  154. end
  155.  
  156. function rayCast(Position, Direction, Range, Ignore)
  157. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  158. end
  159.  
  160. function CreateSound(id, par, vol, pit)
  161. coroutine.resume(coroutine.create(function()
  162. local sou = Instance.new("Sound", par or workspace)
  163. sou.Volume = vol
  164. sou.Pitch = pit or 1
  165. sou.SoundId = id
  166. swait()
  167. sou:play()
  168. game:GetService("Debris"):AddItem(sou, 6)
  169. end))
  170. end
  171.  
  172.  
  173. Handle=CreatePart(m,Enum.Material.Plastic,0.10000000149012,0,"Really black","Handle",Vector3.new(1, 1, 1))
  174. 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))
  175. Tock=CreatePart(m,Enum.Material.Plastic,0,0,"Medium stone grey","Tock",Vector3.new(1, 1, 1))
  176. 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))
  177. CreateMesh("CylinderMesh",Tock,"","",Vector3.new(0, 0, 0),Vector3.new(0.150000006, 0.75, 1))
  178. Tick=CreatePart(m,Enum.Material.Plastic,0,0,"Medium stone grey","Tick",Vector3.new(1, 1, 1))
  179. 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))
  180. 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))
  181. Tick=CreatePart(m,Enum.Material.Plastic,0,0,"Medium stone grey","Tick",Vector3.new(1, 1, 1))
  182. 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))
  183. 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))
  184. CreateMesh("SpecialMesh",Handle,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1.5, 1.5, 1.5))
  185. Part=CreatePart(m,Enum.Material.Plastic,0,0,"Institutional white","Part",Vector3.new(0.540000021, 0.200000003, 0.460000038))
  186. 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))
  187. CreateMesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  188. LeftPeg=CreatePart(m,Enum.Material.Plastic,0,0,"Bright yellow","LeftPeg",Vector3.new(1, 0.560000002, 1))
  189. 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))
  190. CreateMesh("SpecialMesh",LeftPeg,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(0.800000012, 0.75, 0.949999988))
  191. Part=CreatePart(m,Enum.Material.Plastic,0.10000000149012,0,"Institutional white","Part",Vector3.new(0.200000003, 1.13999999, 0.590000033))
  192. 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))
  193. CreateMesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 0.649999976, 1))
  194. Part=CreatePart(m,Enum.Material.Plastic,0.10000000149012,0,"Institutional white","Part",Vector3.new(0.200000003, 1.13999999, 0.590000033))
  195. 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))
  196. CreateMesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 0.649999976, 1))
  197. Poot=CreatePart(m,Enum.Material.Plastic,0,0,"Mid gray","Part",Vector3.new(0.200000003, 0.219999999, 0.200000003))
  198. 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))
  199. CreateMesh("CylinderMesh",Poot,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.5))
  200. Part=CreatePart(m,Enum.Material.Plastic,0,0,"Mid gray","Part",Vector3.new(0.200000003, 0.219999999, 0.200000003))
  201. 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))
  202. CreateMesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.5))
  203. RightPeg=CreatePart(m,Enum.Material.Plastic,0,0,"Bright yellow","RightPeg",Vector3.new(1, 0.570000052, 1))
  204. 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))
  205. CreateMesh("SpecialMesh",RightPeg,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(0.800000012, 0.75, 0.949999988))
  206. Part=CreatePart(m,Enum.Material.Plastic,0,0,"Mid gray","Part",Vector3.new(0.200000003, 0.219999999, 0.200000003))
  207. 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))
  208. CreateMesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.5))
  209.  
  210. function boom()
  211. attack = true
  212. d=Instance.new("Fire",Poot)
  213. d.Heat=0
  214. d.Size=2
  215. CreateSound("http://www.roblox.com/asset/?id=138931042",Torso,1,1)
  216. for i = 0, 1, 0.05 do
  217. swait()
  218. if Torsovelocity > 2 then
  219. 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)
  220. 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)
  221. else
  222. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  223. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  224. end
  225. Handle.BrickColor=BrickColor.new("Bright red")
  226. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  227. end
  228. for i = 0, 1, 0.05 do
  229. swait()
  230. if Torsovelocity > 2 then
  231. 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)
  232. 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)
  233. else
  234. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  235. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  236. end
  237. Handle.BrickColor=BrickColor.new("Black")
  238. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  239. end
  240. for i = 0, 1, 0.1 do
  241. swait()
  242. if Torsovelocity > 2 then
  243. 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)
  244. 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)
  245. else
  246. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  247. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  248. end
  249. Handle.BrickColor=BrickColor.new("Bright red")
  250. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  251. end
  252. for i = 0, 1, 0.1 do
  253. swait()
  254. if Torsovelocity > 2 then
  255. 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)
  256. 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)
  257. else
  258. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  259. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  260. end
  261. Handle.BrickColor=BrickColor.new("Black")
  262. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  263. end
  264. for i = 0, 1, 0.2 do
  265. swait()
  266. if Torsovelocity > 2 then
  267. 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)
  268. 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)
  269. else
  270. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  271. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  272. end
  273. Handle.BrickColor=BrickColor.new("Bright red")
  274. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  275. end
  276. for i = 0, 1, 0.2 do
  277. swait()
  278. if Torsovelocity > 2 then
  279. 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)
  280. 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)
  281. else
  282. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  283. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  284. end
  285. Handle.BrickColor=BrickColor.new("Black")
  286. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  287. end
  288. for i = 0, 1, 0.5 do
  289. swait()
  290. if Torsovelocity > 2 then
  291. 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)
  292. 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)
  293. else
  294. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  295. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  296. end
  297. Handle.BrickColor=BrickColor.new("Bright red")
  298. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  299. end
  300. for i = 0, 1, 0.5 do
  301. swait()
  302. if Torsovelocity > 2 then
  303. 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)
  304. 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)
  305. else
  306. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  307. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  308. end
  309. Handle.BrickColor=BrickColor.new("Black")
  310. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  311. end
  312. for i = 0, 1, 0.5 do
  313. swait()
  314. if Torsovelocity > 2 then
  315. 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)
  316. 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)
  317. else
  318. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  319. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  320. end
  321. Handle.BrickColor=BrickColor.new("Bright red")
  322. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  323. end
  324. for i = 0, 1, 0.5 do
  325. swait()
  326. if Torsovelocity > 2 then
  327. 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)
  328. 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)
  329. else
  330. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  331. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  332. end
  333. Handle.BrickColor=BrickColor.new("Black")
  334. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  335. end
  336. CreateSound("http://www.roblox.com/asset/?id=282185588",Torso,1,1)
  337. gg=Instance.new("Explosion")
  338. gg.Parent=Torso
  339. gg.Position=Torso.Position
  340. attack = false
  341. end
  342.  
  343. --[[Attacks]]--
  344.  
  345. mouse.Button1Down:connect(function()
  346. if attack == false and attacktype == 1 then
  347. boom()
  348. end
  349. end)
  350.  
  351.  
  352. Humanoid.WalkSpeed=10
  353. --[[ Movement Detection ]]--
  354. j=1
  355. while true do
  356. swait()
  357. if j == 360 then
  358. j=1
  359. else
  360. j=j+5
  361. end
  362. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  363. velocity = RootPart.Velocity.y
  364. sine = sine + change
  365. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
  366. if equipped == true or equipped == false then
  367. if RootPart.Velocity.y > 1 and hit == nil then
  368. Anim = "Jump"
  369. if attack == false then
  370.  
  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. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  374. end
  375. elseif RootPart.Velocity.y < -1 and hit == nil then
  376. Anim = "Fall"
  377. if attack == false then
  378.  
  379. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  380. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  381. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  382. end
  383. elseif Torsovelocity < 1 and hit ~= nil then
  384. Anim = "Idle"
  385. if attack == false then
  386. change = 1
  387. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  388. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  389. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  390. end
  391. elseif Torsovelocity > 2 and hit ~= nil then
  392. Anim = "Walk"
  393. if attack == false then
  394. 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)
  395. 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)
  396. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  397. end
  398. end
  399. end
  400. if #Effects > 0 then
  401. for e = 1, #Effects do
  402. if Effects[e] ~= nil then
  403. local Thing = Effects[e]
  404. if Thing ~= nil then
  405. local Part = Thing[1]
  406. local Mode = Thing[2]
  407. local Delay = Thing[3]
  408. local IncX = Thing[4]
  409. local IncY = Thing[5]
  410. local IncZ = Thing[6]
  411. if Thing[1].Transparency <= 1 then
  412. if Thing[2] == "Block1" then
  413. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  414. Mesh = Thing[1].Mesh
  415. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  416. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  417. elseif Thing[2] == "Block2" then
  418. Thing[1].CFrame = Thing[1].CFrame
  419. Mesh = Thing[7]
  420. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  421. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  422. elseif Thing[2] == "Cylinder" then
  423. Mesh = Thing[1].Mesh
  424. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  425. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  426. elseif Thing[2] == "Blood" then
  427. Mesh = Thing[7]
  428. Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, .5, 0)
  429. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  430. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  431. elseif Thing[2] == "Elec" then
  432. Mesh = Thing[1].Mesh
  433. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  434. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  435. elseif Thing[2] == "Disappear" then
  436. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  437. elseif Thing[2] == "Shatter" then
  438. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  439. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  440. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  441. Thing[6] = Thing[6] + Thing[5]
  442. end
  443. else
  444. Part.Parent = nil
  445. table.remove(Effects, e)
  446. end
  447. end
  448. end
  449. end
  450. end
  451. end
Add Comment
Please, Sign In to add comment