Advertisement
EdgyHedgehog

Bumper Car

Dec 26th, 2018
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 95.07 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code by Mokiros")
  6. local rp = RealPlayer
  7. script.Parent = rp.Character
  8.  
  9. --RemoteEvent for communicating
  10. local Event = Instance.new("RemoteEvent")
  11. Event.Name = "UserInput_Event"
  12.  
  13. --Fake event to make stuff like Mouse.KeyDown work
  14. local function fakeEvent()
  15. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16. t.connect = t.Connect
  17. return t
  18. end
  19.  
  20. --Creating fake input objects with fake variables
  21. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  22. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25. end}
  26. --Merged 2 functions into one by checking amount of arguments
  27. CAS.UnbindAction = CAS.BindAction
  28.  
  29. --This function will trigger the events that have been :Connect()'ed
  30. local function te(self,ev,...)
  31. local t = m[ev]
  32. if t and t._fakeEvent then
  33. for _,f in pairs(t.Functions) do
  34. f(...)
  35. end
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=rp then return end
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. if not io.isMouse then
  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 Mouse = Player:GetMouse()
  66. local UIS = game:GetService("UserInputService")
  67. local input = function(io,a)
  68. if a then return end
  69. --Since InputObject is a client-side instance, we create and pass table instead
  70. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  71. end
  72. UIS.InputBegan:Connect(input)
  73. UIS.InputEnded:Connect(input)
  74.  
  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.  
  85. ----Sandboxed game object that allows the usage of client-side methods and services
  86. --Real game object
  87. local _rg = game
  88.  
  89. --Metatable for fake service
  90. local fsmt = {
  91. __index = function(self,k)
  92. local s = rawget(self,"_RealService")
  93. if s then return s[k] end
  94. end,
  95. __newindex = function(self,k,v)
  96. local s = rawget(self,"_RealService")
  97. if s then s[k]=v end
  98. end,
  99. __call = function(self,...)
  100. local s = rawget(self,"_RealService")
  101. if s then return s(...) end
  102. end
  103. }
  104. local function FakeService(t,RealService)
  105. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106. return setmetatable(t,fsmt)
  107. end
  108.  
  109. --Fake game object
  110. local g = {
  111. GetService = function(self,s)
  112. return self[s]
  113. end,
  114. Players = FakeService({
  115. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116. },"Players"),
  117. UserInputService = FakeService(UIS,"UserInputService"),
  118. ContextActionService = FakeService(CAS,"ContextActionService"),
  119. }
  120. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  121. g.service = g.GetService
  122.  
  123. g.RunService = FakeService({
  124. RenderStepped = _rg:GetService("RunService").Heartbeat,
  125. BindToRenderStep = function(self,name,_,fun)
  126.  
  127. end,
  128. UnbindFromRenderStep = function(self,name)
  129. self._btrs[name]:Disconnect()
  130. end,
  131. },"RunService")
  132.  
  133. setmetatable(g,{
  134. __index=function(self,s)
  135. return _rg:GetService(s) or typeof(_rg[s])=="function"
  136. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  137. end,
  138. __newindex = fsmt.__newindex,
  139. __call = fsmt.__call
  140. })
  141. --Changing owner to fake player object to support owner:GetMouse()
  142. game,owner = g,g.Players.LocalPlayer
  143. end
  144. -----------------------------
  145. --[[ Created By Draconix ]]--
  146.  
  147. maincolor = game.Players.LocalPlayer.Character.Torso.BrickColor.Name
  148. secondcolor = "Really black"
  149.  
  150. wait(1 / 60)
  151. Effects = { }
  152. local Player = owner
  153. local Character = Player.Character
  154. local Humanoid = Character.Humanoid
  155. local mouse = Player:GetMouse()
  156. local LeftArm = Character["Left Arm"]
  157. local RightArm = Character["Right Arm"]
  158. local LeftLeg = Character["Left Leg"]
  159. local RightLeg = Character["Right Leg"]
  160. local Head = Character.Head
  161. local Torso = Character.Torso
  162. local cam = game.Workspace.CurrentCamera
  163. local RootPart = Character.HumanoidRootPart
  164. local RootJoint = RootPart.RootJoint
  165. local equipped = true
  166. local attack = false
  167. local Anim = 'Idle'
  168. local idle = 0
  169. local attacktype = 1
  170. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  171. local velocity = RootPart.Velocity.y
  172. local sine = 0
  173. local change = 1
  174. local grabbed = false
  175. local cn = CFrame.new
  176. local mr = math.rad
  177. local angles = CFrame.Angles
  178. local ud = UDim2.new
  179. local c3 = Color3.new
  180. local dir = {w = 0, s = 0, a = 0, d = 0}
  181. Climbanim = false
  182. Runkey=false
  183. firemode = false
  184. inair = false
  185. blocking=false
  186. humHsave=0
  187. humDsave=0
  188. extralock=true
  189. lasthit = nil
  190. IKM = false
  191. HMDX = Humanoid.MoveDirection.X/3
  192. HMDZ = Humanoid.MoveDirection.Z/3
  193. local s = Instance.new("Sound",Character)
  194. s.Name = "BumperCarSound"
  195. s.SoundId = "http://www.roblox.com/asset/?id=532147820"
  196. s.Pitch = .7
  197. s.Volume = .5
  198. s.Looped = true
  199. s.archivable = false
  200. s.Parent = Character
  201. s:play()
  202.  
  203. sflon = true
  204. bg2 = Instance.new("BodyGyro", game.Players.LocalPlayer.Character.HumanoidRootPart)
  205. game:GetService("RunService"):BindToRenderStep("ew", 0, function()
  206. if attack == true then
  207. bg2.D = 0
  208. bg2.P = 0
  209. bg2.maxTorque = Vector3.new(0,0,0)
  210. end
  211. if attack == false then
  212. bg2.D = 100
  213. bg2.P = 9999
  214. bg2.maxTorque = Vector3.new(1e+005,1e+000,1e+005)*math.huge
  215. bg2.CFrame = CFrame.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position ,Vector3.new(game.Workspace.CurrentCamera.CoordinateFrame.p.x,game.Players.LocalPlayer.Character.HumanoidRootPart.Position.y,game.Workspace.CurrentCamera.CoordinateFrame.p.z)) * CFrame.Angles(0,math.rad(180),0)
  216.  
  217. end
  218. end)--]]
  219.  
  220.  
  221. New = function(Object, Parent, Name, Data)
  222. local Object = Instance.new(Object)
  223. for Index, Value in pairs(Data or {}) do
  224. Object[Index] = Value
  225. end
  226. Object.Parent = Parent
  227. Object.Name = Name
  228. return Object
  229. end
  230.  
  231. BumperCar = New("Model",Workspace,"BumperCar",{})
  232. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.099999845, 0.199999988, 0.299999952),CFrame = CFrame.new(-5.95999956, 9.90000057, -36.2131157, 1, 7.64274186e-15, 0, 7.64274186e-15, -1, -8.74227766e-08, 0, 8.74227766e-08, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  233. Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(1.5, 0.100000001, 0.100000001),CFrame = CFrame.new(-4.02177143, 11.8595181, -40.6349945, -0.466506243, -0.129409313, 0.87500006, -0.741025686, -0.482962549, -0.466506183, 0.482962519, -0.866025567, 0.129409432),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
  234. Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Dark stone grey"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.099999994, 3.9000001, 3.9000001),CFrame = CFrame.new(-5.16500664, 8.05000019, -38.9131165, -4.37113883e-08, -1, 0, 1, -4.37113883e-08, 0, 0, 0, 0.999999821),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),})
  235. Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(2.79999995, 0.800000072, 0.800000072),CFrame = CFrame.new(-5.81500626, 8.5, -34.7631149, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),})
  236. SwHandle = New("Part",BumperCar,"Handle",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(4, 0.899999976, 4),CFrame = CFrame.new(-5.16500664, 7.55000019, -36.9631157, 1, 0, 0, 0, 1, 0, 0, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
  237. Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Olive"),Material = Enum.Material.Neon,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.099999845, 0.699999988, 0.699999988),CFrame = CFrame.new(-5.81500578, 8.5, -33.4031143, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.756863, 0.745098, 0.258824),})
  238. Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.899999976, 4, 4),CFrame = CFrame.new(-5.16500664, 7.55000019, -34.9631157, -4.37113883e-08, -1, 0, 1, -4.37113883e-08, 0, 0, 0, 0.999999821),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
  239. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.799999952, 0.599999964, 1.49999952),CFrame = CFrame.new(-6.46000004, 8.85000038, -39.5131149, 4.37113883e-08, -1, -1.19248771e-08, 8.74227695e-08, 1.19248798e-08, -0.99999994, 1, 4.37113883e-08, 8.74227766e-08),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),})
  240. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.099999845, 1, 0.299999952),CFrame = CFrame.new(-4.35999966, 9.60000038, -36.2131157, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  241. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.199999958, 1, 0.999999523),CFrame = CFrame.new(-3.50999951, 8.60000038, -36.8631134, 1, 0, 1.74845553e-07, 0, 1, 0, -1.74845553e-07, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  242. Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(2.89999986, 1.99999988, 1.99999988),CFrame = CFrame.new(-5.15999985, 8.5, -34.9000015, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  243. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(1.49999976, 0.0999999866, 0.109999947),CFrame = CFrame.new(-5.15999985, 9.95000076, -36.4081154, -1, -1.52854837e-14, 8.74227766e-08, 7.64274186e-15, -1, -8.74227766e-08, 8.74227766e-08, -8.74227766e-08, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  244. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.199999958, 1, 0.999999523),CFrame = CFrame.new(-6.80999947, 8.60000038, -36.8631134, 1, 0, 1.74845553e-07, 0, 1, 0, -1.74845553e-07, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  245. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.200000048, 1.60000002, 0.999999523),CFrame = CFrame.new(-6.80999947, 8.90000057, -38.5631142, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  246. Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(1.49999988, 0.200000003, 0.200000003),CFrame = CFrame.new(-4.52999973, 10.6799994, -40.1199951, -0.258819044, 3.08638382e-09, 0.965925813, -0.933012724, -0.258818835, -0.25, 0.249999776, -0.965925872, 0.0669872463),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
  247. Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.899999976, 4, 4),CFrame = CFrame.new(-5.16500664, 7.55000019, -38.9631157, -4.37113883e-08, -1, 0, 1, -4.37113883e-08, 0, 0, 0, 0.999999821),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
  248. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(1.69999993, 0.100000024, 0.0999999493),CFrame = CFrame.new(-5.15999985, 10.0500002, -36.4131165, 1, 0, 1.74845553e-07, 0, 1, 0, -1.74845553e-07, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  249. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.200000048, 1.60000002, 0.999999523),CFrame = CFrame.new(-3.50999975, 8.90000057, -38.5631142, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  250. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.200000048, 1, 3.89999962),CFrame = CFrame.new(-3.50999975, 8.60000038, -37.1131134, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  251. Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.399999857, 0.300000012, 0.300000012),CFrame = CFrame.new(-4.67235041, 10.1668425, -39.9824944, -0.258819044, 3.08638382e-09, 0.965925813, -0.933012724, -0.258818835, -0.25, 0.249999776, -0.965925872, 0.0669872463),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
  252. Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(1.5, 0.0500000007, 0.0500000007),CFrame = CFrame.new(-3.11038089, 12.7026892, -41.3446198, -0.774519205, -0.353553116, 0.524519026, -0.408493787, -0.353553116, -0.841506362, 0.482962519, -0.866025567, 0.129409432),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
  253. Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.999999881, 2.0999999, 2.0999999),CFrame = CFrame.new(-5.15999985, 8.69999981, -40.1499977, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  254. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.799999952, 0.600000024, 0.299999565),CFrame = CFrame.new(-5.85999918, 9.45000076, -39.5131149, 4.37113883e-08, 1, 1.19248771e-08, 7.10542736e-15, -1.19248762e-08, 0.99999994, 1, -4.37113883e-08, 6.06292123e-15),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),})
  255. Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.899999857, 2.20000005, 2.20000005),CFrame = CFrame.new(-5.15999985, 8.69999981, -40.0999985, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  256. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.799999952, 0.600000024, 0.199999571),CFrame = CFrame.new(-4.46000051, 9.70000076, -39.5131149, -1.31134158e-07, 1, 1.19248691e-08, 8.74227695e-08, 1.19248798e-08, -0.99999994, -1, -1.31134158e-07, -8.74227766e-08),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),})
  257. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.400000006, 0.300000012, 2.9000001),CFrame = CFrame.new(-5.15999985, 9.55000019, -34.9131165, 1, 0, 1.74845553e-07, 0, 1, 0, -1.74845553e-07, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),})
  258. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.0999999046, 1, 0.299999952),CFrame = CFrame.new(-5.96000004, 9.60000038, -36.2131157, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  259. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.799999952, 0.600000024, 1.49999952),CFrame = CFrame.new(-3.8599999, 8.85000038, -39.5131149, -1.31134158e-07, 1, 1.19248691e-08, 8.74227695e-08, 1.19248798e-08, -0.99999994, -1, -1.31134158e-07, -8.74227766e-08),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),})
  260. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.799999952, 0.600000024, 0.199999571),CFrame = CFrame.new(-5.85999918, 9.70000076, -39.5131149, 4.37113883e-08, -1, -1.19248771e-08, 8.74227695e-08, 1.19248798e-08, -0.99999994, 1, 4.37113883e-08, 8.74227766e-08),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),})
  261. Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(2.5999999, 1.20000005, 1.20000005),CFrame = CFrame.new(-4.51500654, 8.19999981, -34.8631134, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  262. Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(3.34999967, 0.0999999866, 2.69999981),CFrame = CFrame.new(-5.1150074, 8.15000057, -37.7131157, 1, 0, 0, 0, 1, 0, 0, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),})
  263. Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(2.5999999, 1.20000005, 1.20000005),CFrame = CFrame.new(-5.81500626, 8.19999981, -34.8631134, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  264. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.400000006, 0.300000012, 0.200000092),CFrame = CFrame.new(-5.15999985, 9.55000019, -33.3631172, -1, 0, -2.62268316e-07, 0, 1, 0, 2.62268316e-07, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),})
  265. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.099999845, 0.199999988, 0.299999952),CFrame = CFrame.new(-4.35999966, 9.90000057, -36.2131157, 1, 7.64274186e-15, 0, 7.64274186e-15, -1, -8.74227766e-08, 0, 8.74227766e-08, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  266. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Medium blue"),Material = Enum.Material.SmoothPlastic,Transparency = 0.5,Transparency = 0.5,Size = Vector3.new(1.49999988, 0.980000019, 0.279999942),CFrame = CFrame.new(-5.16000032, 9.59000015, -36.2031174, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.431373, 0.6, 0.792157),})
  267. Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Dark stone grey"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(3.8499999, 0.099999994, 4),CFrame = CFrame.new(-5.16500711, 8.05000019, -36.9631157, 1, 0, 0, 0, 1, 0, 0, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),})
  268. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.799999952, 0.600000024, 0.299999565),CFrame = CFrame.new(-4.45999908, 9.45000076, -39.5131149, -1.31134158e-07, -1, -1.19248771e-08, 7.10542736e-15, -1.19248762e-08, 0.99999994, -1, 1.31134158e-07, -5.0204151e-15),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),})
  269. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(1.69999993, 0.100000024, 0.299999952),CFrame = CFrame.new(-5.15999985, 10.0500002, -36.2131157, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  270. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.400000006, 1.4000001, 0.200000092),CFrame = CFrame.new(-5.15999985, 8.69999981, -33.3631172, 1, 8.74227766e-08, 2.62268316e-07, 8.74227766e-08, -1, 2.29282247e-14, 2.62268316e-07, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),})
  271. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(1, 1, 2),CFrame = CFrame.new(-4.15999985, 8.60000038, -35.3631172, -1.19248806e-08, 1, -1.04250613e-15, 1, 1.19248806e-08, 8.74227766e-08, 8.74227766e-08, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  272. Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Dark stone grey"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.099999994, 3.9000001, 3.9000001),CFrame = CFrame.new(-5.16500664, 8.05000019, -35.0131149, -4.37113883e-08, -1, 0, 1, -4.37113883e-08, 0, 0, 0, 0.999999821),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),})
  273. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.199999958, 1, 3.89999962),CFrame = CFrame.new(-6.80999994, 8.60000038, -37.1131134, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  274. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.099999845, 0.199999988, 0.0999999493),CFrame = CFrame.new(-4.35999966, 9.90000057, -36.4131165, -1, -1.52854837e-14, 8.74227766e-08, 7.64274186e-15, -1, -8.74227766e-08, 8.74227766e-08, -8.74227766e-08, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  275. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(3.5, 1, 1.19999993),CFrame = CFrame.new(-5.15999985, 8.60000038, -35.7631149, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  276. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(1, 1, 2),CFrame = CFrame.new(-6.15999985, 8.60000038, -35.3631172, 9.9347659e-08, -1, 8.68524799e-15, -1, -9.9347659e-08, -8.74227766e-08, 8.74227766e-08, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  277. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(3, 1, 1.99000001),CFrame = CFrame.new(-5.15999985, 8.60000038, -35.3581161, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),})
  278. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(3.5, 0.600000024, 1.59999955),CFrame = CFrame.new(-5.15999985, 8.90000057, -39.3631134, -1, 0, -8.74227766e-08, 8.74227766e-08, 1.19248806e-08, -1, 1.04250613e-15, -1, -1.19248806e-08),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  279. Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.799999833, 2.29999995, 2.29999995),CFrame = CFrame.new(-5.15999985, 8.69999981, -40.0499992, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  280. Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Olive"),Material = Enum.Material.Neon,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.099999845, 0.699999988, 0.699999988),CFrame = CFrame.new(-4.51500607, 8.5, -33.4031143, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.756863, 0.745098, 0.258824),})
  281. Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.899999857, 2.39999986, 2.39999986),CFrame = CFrame.new(-5.15999985, 8.69999981, -39.5, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  282. Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(1.99999988, 1.60000002, 1.60000002),CFrame = CFrame.new(-5.15999985, 9.05000019, -39.9999962, -2.08616257e-07, 0, 1, -1, 1.19248806e-08, -2.08616257e-07, -1.19248806e-08, -1, -2.48772391e-15),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  283. Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.699999809, 2.0999999, 2.0999999),CFrame = CFrame.new(-5.15999985, 8.55000019, -35.5999985, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  284. Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.71999979, 2.19999981, 2.19999981),CFrame = CFrame.new(-5.15999985, 8.60000038, -36.0099983, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  285. Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(2.79999995, 0.800000072, 0.800000072),CFrame = CFrame.new(-4.51500654, 8.5, -34.7631149, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),})
  286. Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.099999845, 0.199999988, 0.0999999493),CFrame = CFrame.new(-5.95999956, 9.90000057, -36.4131165, -1, -1.52854837e-14, 8.74227766e-08, 7.64274186e-15, -1, -8.74227766e-08, 8.74227766e-08, -8.74227766e-08, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),})
  287.  
  288.  
  289.  
  290.  
  291. FrontPart = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(6, 6, 6),CFrame = CFrame.new(-5.16500664, 7.55000019, -34.9631157, -4.37113883e-08, -1, 0, 1, -4.37113883e-08, 0, 0, 0, 0.999999821),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),Transparency = 1,})
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308. local all,last = {}
  309. function scan(p)
  310. for _,v in pairs(p:GetChildren()) do
  311. if (v:IsA("BasePart")) then
  312. if (last) then
  313. local w = Instance.new("Weld")
  314. w.Part0,w.Part1 = last,v
  315. w.C0 = v.CFrame:toObjectSpace(last.CFrame):inverse()
  316. w.Parent = last
  317. end
  318. table.insert(all,v)
  319. last = v
  320. end
  321. scan(v)
  322. end
  323. end
  324. scan(BumperCar)
  325.  
  326.  
  327. for _,v in pairs(all) do v.Anchored = false v.CanCollide = false end
  328. BumperCar.Parent = Character
  329.  
  330.  
  331. local Services = {
  332.  
  333.  
  334. SoundService = game:GetService("SoundService");
  335. Players = game:GetService("Players");
  336. Debris = game:GetService("Debris");
  337. Workspace = game:GetService("Workspace");
  338. Lighting = game:GetService("Lighting");
  339. HttpService = game:GetService("HttpService");
  340. InsertService = game:GetService("InsertService");
  341.  
  342. }
  343.  
  344. local NeckCF = cn(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  345. Humanoid.Animator:Destroy()
  346. Character.Animate:Destroy()
  347.  
  348. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  349. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  350. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  351.  
  352.  
  353.  
  354. SWW = Instance.new("Weld")
  355. SWW.Name = "SWW"
  356. SWW.Part0 = Torso
  357. SWW.C0 = cn(0, -2.6, -1)*angles(math.rad(-0),math.rad(-180),math.rad(0))
  358. SWW.C1 = cn(0, 0, 0)
  359. SWW.Part1 = SwHandle
  360. SWW.Parent = Torso
  361.  
  362. RSH, LSH = nil, nil
  363.  
  364. RW = Instance.new("Weld")
  365. LW = Instance.new("Weld")
  366.  
  367. RH = Torso["Right Hip"]
  368. LH = Torso["Left Hip"]
  369.  
  370. RSH = Torso["Right Shoulder"]
  371. LSH = Torso["Left Shoulder"]
  372.  
  373. RSH.Parent = nil
  374. LSH.Parent = nil
  375.  
  376. RW.Name = "RW"
  377. RW.Part0 = Torso
  378. RW.C0 = cn(1.5, 0.5, 0)
  379. RW.C1 = cn(0, 0.5, 0)
  380. RW.Part1 = RightArm
  381. RW.Parent = Torso
  382.  
  383. LW.Name = "LW"
  384. LW.Part0 = Torso
  385. LW.C0 = cn(-1.5, 0.5, 0)
  386. LW.C1 = cn(0, 0.5, 0)
  387. LW.Part1 = LeftArm
  388. LW.Parent = Torso
  389.  
  390. function clerp(a, b, t)
  391. local qa = {
  392. QuaternionFromCFrame(a)
  393. }
  394. local qb = {
  395. QuaternionFromCFrame(b)
  396. }
  397. local ax, ay, az = a.x, a.y, a.z
  398. local bx, by, bz = b.x, b.y, b.z
  399. local _t = 1 - t
  400. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  401. end
  402.  
  403. function QuaternionFromCFrame(cf)
  404. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  405. local trace = m00 + m11 + m22
  406. if trace > 0 then
  407. local s = math.sqrt(1 + trace)
  408. local recip = 0.5 / s
  409. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  410. else
  411. local i = 0
  412. if m11 > m00 then
  413. i = 1
  414. end
  415. if m22 > (i == 0 and m00 or m11) then
  416. i = 2
  417. end
  418. if i == 0 then
  419. local s = math.sqrt(m00 - m11 - m22 + 1)
  420. local recip = 0.5 / s
  421. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  422. elseif i == 1 then
  423. local s = math.sqrt(m11 - m22 - m00 + 1)
  424. local recip = 0.5 / s
  425. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  426. elseif i == 2 then
  427. local s = math.sqrt(m22 - m00 - m11 + 1)
  428. local recip = 0.5 / s
  429. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  430. end
  431. end
  432. end
  433.  
  434. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  435. local xs, ys, zs = x + x, y + y, z + z
  436. local wx, wy, wz = w * xs, w * ys, w * zs
  437. local xx = x * xs
  438. local xy = x * ys
  439. local xz = x * zs
  440. local yy = y * ys
  441. local yz = y * zs
  442. local zz = z * zs
  443. return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
  444. end
  445.  
  446. function QuaternionSlerp(a, b, t)
  447. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  448. local startInterp, finishInterp;
  449. if cosTheta >= 0.0001 then
  450. if (1 - cosTheta) > 0.0001 then
  451. local theta = math.acos(cosTheta)
  452. local invSinTheta = 1 / math.sin(theta)
  453. startInterp = math.sin((1 - t) * theta) * invSinTheta
  454. finishInterp = math.sin(t * theta) * invSinTheta
  455. else
  456. startInterp = 1 - t
  457. finishInterp = t
  458. end
  459. else
  460. if (1 + cosTheta) > 0.0001 then
  461. local theta = math.acos(-cosTheta)
  462. local invSinTheta = 1 / math.sin(theta)
  463. startInterp = math.sin((t - 1) * theta) * invSinTheta
  464. finishInterp = math.sin(t * theta) * invSinTheta
  465. else
  466. startInterp = t - 1
  467. finishInterp = t
  468. end
  469. end
  470. return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
  471. end
  472.  
  473. function swait(num)
  474. if num == 0 or num == nil then
  475. game:service'RunService'.RenderStepped:wait(0)
  476. else
  477. for i = 0, num do
  478. game:service'RunService'.RenderStepped:wait(0)
  479. end
  480. end
  481. end
  482.  
  483. local RbxUtility = LoadLibrary("RbxUtility")
  484. local Create = RbxUtility.Create
  485.  
  486. function RemoveOutlines(part)
  487. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  488. end
  489.  
  490. function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  491. local Part = Create("Part"){
  492. formFactor = FormFactor,
  493. Parent = Parent,
  494. Reflectance = Reflectance,
  495. Transparency = Transparency,
  496. CanCollide = false,
  497. Locked = true,
  498. BrickColor = BrickColor.new(tostring(BColor)),
  499. Name = Name,
  500. Size = Size,
  501. Material = Material,
  502. }
  503. RemoveOutlines(Part)
  504. return Part
  505. end
  506.  
  507. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  508. local Msh = Create(Mesh){
  509. Parent = Part,
  510. Offset = OffSet,
  511. Scale = Scale,
  512. }
  513. if Mesh == "SpecialMesh" then
  514. Msh.MeshType = MeshType
  515. Msh.MeshId = MeshId
  516. end
  517. return Msh
  518. end
  519.  
  520. function CreateWeld(Parent, Part0, Part1, C0, C1)
  521. local Weld = Create("Weld"){
  522. Parent = Parent,
  523. Part0 = Part0,
  524. Part1 = Part1,
  525. C0 = C0,
  526. C1 = C1,
  527. }
  528. return Weld
  529. end
  530.  
  531. function rayCast(Position, Direction, Range, Ignore)
  532. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  533. end
  534.  
  535. function CreateSound(id, par, vol, pit)
  536. coroutine.resume(coroutine.create(function()
  537. local sou = Instance.new("Sound", par or workspace)
  538. sou.Volume = vol
  539. sou.Pitch = pit or 1
  540. sou.SoundId = id
  541. wait()
  542. sou:play()
  543. game:GetService("Debris"):AddItem(sou, 6)
  544. end))
  545. end
  546. function CreateSong(id, par, vol, pit)
  547. coroutine.resume(coroutine.create(function()
  548. sou2 = Instance.new("Sound", par or workspace)
  549. sou2.Volume = vol
  550. sou2.Pitch = 1
  551. sou2.SoundId = id
  552. wait()
  553. sou2:play()
  554. sou2.Looped = true
  555. end))
  556. end
  557.  
  558. local function getclosest(obj, distance)
  559. local last, lastx = distance + 1
  560. for i, v in pairs(workspace:GetChildren()) do
  561. if v:IsA'Model' and v ~= Character and v:findFirstChild('Humanoid') and v:findFirstChild('Torso') and v:findFirstChild('Humanoid').Health > 0 then
  562. local t = v.Torso
  563. local dist = (t.Position - obj.Position).magnitude
  564. if dist <= distance then
  565. if dist < last then
  566. last = dist
  567. lastx = v
  568. end
  569. end
  570. end
  571. end
  572. return lastx
  573. end
  574.  
  575. function Damage(hit, damage, cooldown, Color1, Color2, HSound, HPitch)
  576. for i, v in pairs(hit:GetChildren()) do
  577. if v:IsA("Humanoid") and hit.Name ~= Character.Name then
  578. local find = v:FindFirstChild("Hitz")
  579. if not find then
  580. if v.Parent:findFirstChild("Head") then
  581. local BillG = Create("BillboardGui"){
  582. Parent = v.Parent.Head,
  583. Size = UDim2.new(1, 0, 1, 0),
  584. Adornee = v.Parent.Head,
  585. StudsOffset = Vector3.new(math.random(-3, 3), math.random(3, 5), math.random(-3, 3)),
  586. }
  587. local TL = Create("TextLabel"){
  588. Parent = BillG,
  589. Size = UDim2.new(3, 3, 3, 3),
  590. BackgroundTransparency = 1,
  591. Text = tostring(damage).."-",
  592. TextColor3 = Color1.Color,
  593. TextStrokeColor3 = Color2.Color,
  594. TextStrokeTransparency = 0,
  595. TextXAlignment = Enum.TextXAlignment.Center,
  596. TextYAlignment = Enum.TextYAlignment.Center,
  597. FontSize = Enum.FontSize.Size18,
  598. Font = "ArialBold",
  599. }
  600. coroutine.resume(coroutine.create(function()
  601. wait(1)
  602. for i = 0, 1, .1 do
  603. wait(.1)
  604. BillG.StudsOffset = BillG.StudsOffset + Vector3.new(0, .1, 0)
  605. end
  606. BillG:Destroy()
  607. end))
  608. end
  609. v.Health = v.Health - damage
  610. local bool = Create("BoolValue"){
  611. Parent = v,
  612. Name = 'Hitz',
  613. }
  614. if HSound ~= nil and HPitch ~= nil then
  615. CreateSound(HSound, hit, 1, HPitch)
  616. end
  617. game:GetService("Debris"):AddItem(bool, cooldown)
  618. end
  619. end
  620. end
  621. end
  622.  
  623.  
  624. function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  625. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  626. prt.Anchored = true
  627. prt.CFrame = cframe
  628. local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  629. game:GetService("Debris"):AddItem(prt, 10)
  630. if Type == 1 or Type == nil then
  631. table.insert(Effects, {
  632. prt,
  633. "Block1",
  634. delay,
  635. x3,
  636. y3,
  637. z3,
  638. msh
  639. })
  640. elseif Type == 2 then
  641. table.insert(Effects, {
  642. prt,
  643. "Block2",
  644. delay,
  645. x3,
  646. y3,
  647. z3,
  648. msh
  649. })
  650. elseif Type == 3 then
  651. table.insert(Effects, {
  652. prt,
  653. "Block3",
  654. delay,
  655. x3,
  656. y3,
  657. z3,
  658. msh
  659. })
  660. end
  661. end
  662.  
  663. function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  664. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  665. prt.Anchored = true
  666. prt.CFrame = cframe
  667. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  668. game:GetService("Debris"):AddItem(prt, 10)
  669. table.insert(Effects, {
  670. prt,
  671. "Cylinder",
  672. delay,
  673. x3,
  674. y3,
  675. z3,
  676. msh
  677. })
  678. end
  679.  
  680. function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  681. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  682. prt.Anchored = true
  683. prt.CFrame = cframe * CFrame.new(x1, y1, z1)
  684. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "264766957", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  685. game:GetService("Debris"):AddItem(prt, 10)
  686. table.insert(Effects, {
  687. prt,
  688. "Cylinder",
  689. delay,
  690. x3,
  691. y3,
  692. z3,
  693. msh
  694. })
  695. end
  696.  
  697. function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  698. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  699. prt.Anchored = true
  700. prt.CFrame = cframe
  701. local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  702. game:GetService("Debris"):AddItem(prt, 10)
  703. table.insert(Effects, {
  704. prt,
  705. "Cylinder",
  706. delay,
  707. x3,
  708. y3,
  709. z3,
  710. msh
  711. })
  712. end
  713.  
  714. function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  715. local prt = CreatePart(3, workspace,"Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  716. prt.Anchored = true
  717. prt.CFrame = cframe
  718. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "264766957", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  719. game:GetService("Debris"):AddItem(prt, 10)
  720. table.insert(Effects, {
  721. prt,
  722. "Cylinder",
  723. delay,
  724. x3,
  725. y3,
  726. z3,
  727. msh
  728. })
  729. end
  730.  
  731. function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  732. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  733. prt.Anchored = true
  734. prt.CFrame = cframe
  735. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  736. game:GetService("Debris"):AddItem(prt, 10)
  737. table.insert(Effects, {
  738. prt,
  739. "Cylinder",
  740. delay,
  741. x3,
  742. y3,
  743. z3,
  744. msh
  745. })
  746. end
  747.  
  748. function BreakEffect(brickcolor, cframe, x1, y1, z1)
  749. local prt = CreatePart(3, workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  750. prt.Anchored = true
  751. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  752. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  753. local num = math.random(10, 50) / 1000
  754. game:GetService("Debris"):AddItem(prt, 10)
  755. table.insert(Effects, {
  756. prt,
  757. "Shatter",
  758. num,
  759. prt.CFrame,
  760. math.random() - math.random(),
  761. 0,
  762. math.random(50, 100) / 100
  763. })
  764. end
  765.  
  766.  
  767.  
  768.  
  769. for i = 0, 1, 0.05 do
  770. swait()
  771. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  772. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1)
  773. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(0), math.rad(5)), 0.1)
  774. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-10)), 0.3)
  775. if Torsovelocity > 2 then
  776. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-50 * math.cos(sine / 4)), math.rad(0), math.rad(4 * math.cos(sine / 4))), .2)
  777. RH.C0 = clerp(RH.C0, cn(1, -1 + .1 * math.cos(sine / 5), 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3)
  778. LH.C0 = clerp(LH.C0, cn(-1, -1 + .1 * math.cos(sine / 5), 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3)
  779. elseif Torsovelocity < 1 then
  780. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(0), math.rad(5)), 0.1)
  781. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  782. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  783. end
  784. end
  785. attack = false
  786.  
  787.  
  788.  
  789. game:GetService'RunService'.Stepped:connect(function()
  790. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  791. velocity = RootPart.Velocity.y
  792. sine = sine + change
  793. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
  794. if equipped == true or equipped == false then
  795. if RootPart.Velocity.y > -1 and hit == nil then
  796. Anim = "Jump"
  797. inair = true
  798. if attack == false then
  799. s.Pitch = 1
  800. s.Volume = 1
  801. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(15), math.rad(0), math.rad(0)), .1)
  802. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-1 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1)
  803. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-15)), 0.1)
  804. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(15)), 0.1)
  805. RH.C0 = clerp(RH.C0, cn(1, -1 - 0.1 * math.cos(sine / 8), 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1)
  806. LH.C0 = clerp(LH.C0, cn(-1, -1 - 0.1 * math.cos(sine / 8), -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1)
  807. SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1)
  808. end
  809.  
  810. elseif RootPart.Velocity.y < -1 and hit == nil then
  811. Anim = "Fall"
  812. inair = true
  813. if attack == false then
  814. s.Pitch = .7
  815. s.Volume = .5
  816. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  817. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-1 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1)
  818. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(180 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(45)), 0.05)
  819. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(180 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-45)), 0.05)
  820. RH.C0 = clerp(RH.C0, cn(1, -1 - 0.1 * math.cos(sine / 8), 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1)
  821. LH.C0 = clerp(LH.C0, cn(-1, -1 - 0.1 * math.cos(sine / 8), -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1)
  822. SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1)
  823. end
  824. elseif Torsovelocity < 1 and hit ~= nil then
  825. Anim = "Idle"
  826.  
  827. inair = false
  828. if attack == false then
  829. s.Pitch = .7
  830. s.Volume = .5
  831. change = 0.8
  832. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  833. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-1 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1)
  834. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1)
  835. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1)
  836. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1)
  837. LH.C0 = clerp(LH.C0, cn(-1, -1, -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1)
  838. SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1)
  839. end --]]
  840.  
  841. elseif Torsovelocity > 1 and hit ~= nil then
  842. Anim = "Walk"
  843. inair = false
  844.  
  845. if attack == false and Runkey == true then
  846. s.Pitch = 1
  847. s.Volume = .9
  848.  
  849. change = 1
  850. Humanoid.WalkSpeed = 30
  851. Humanoid.JumpPower = 55
  852. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(-45), math.rad(0) + RootPart.RotVelocity.Y/40, math.rad(2 * math.cos(sine / 1))), .4)
  853. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(35 - 1 * math.cos(sine / 4)), math.rad(0), math.rad(-0) + RootPart.RotVelocity.Y/20), .2)
  854. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(25 - 1 * math.cos(sine / 4)), math.rad(0), math.rad(-45)), 0.2)
  855. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(25 + 1 * math.cos(sine / 4)), math.rad(0), math.rad(45)), 0.2)
  856. RH.C0 = clerp(RH.C0, cn(.6, -1, 0) * RHCF * angles(math.rad(6), math.rad(0), math.rad(45 + .05 * math.cos(sine / 25))), .4)
  857. LH.C0 = clerp(LH.C0, cn(-.6, -1, -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-45 + .05 * math.cos(sine / 25))), .4)
  858. SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1,1) * angles(math.rad(-45),math.rad(-180),math.rad(0)), 0.4)
  859. end
  860. if attack == false and Runkey == false then
  861. s.Pitch = .8
  862. s.Volume = .6
  863. change = 0.65
  864. Humanoid.WalkSpeed = 13 --* math.cos(sine / 2)
  865. Humanoid.JumpPower = 50
  866. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(0), math.rad(0), math.rad(.5 * math.cos(sine / 1))), .3)
  867. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-1 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0) + RootPart.RotVelocity.Y/20), .1)
  868. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1)
  869. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1)
  870. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1)
  871. LH.C0 = clerp(LH.C0, cn(-1, -1, -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1)
  872. SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1)
  873. end
  874.  
  875.  
  876.  
  877.  
  878. function onClimbing(speed)
  879. if attack == false then
  880. attack = true
  881. Climbanim= true
  882. Humanoid.WalkSpeed = 14
  883. while Climbanim == true do
  884. for i = 0, 0, 0.1 do
  885. swait()
  886.  
  887. change = 0.5
  888.  
  889.  
  890.  
  891. if RootPart.Velocity.y > .01 then
  892. s.Pitch = .9
  893. s.Volume = .5
  894. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 1, -1.1) * angles(math.rad(-90), math.rad(0), math.rad(0)), .3)
  895. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-1 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1)
  896. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1)
  897. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1)
  898. RH.C0 = clerp(RH.C0, cn(1, -1 - 0.1 * math.cos(sine / 8), 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1)
  899. LH.C0 = clerp(LH.C0, cn(-1, -1 - 0.1 * math.cos(sine / 8), -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1)
  900. SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1)
  901. end
  902.  
  903.  
  904.  
  905.  
  906. if RootPart.Velocity.y < .5 and RootPart.Velocity.y > -0.5 then
  907. s.Pitch = .7
  908. s.Volume = .5
  909. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 1, -1.1) * angles(math.rad(-90), math.rad(0), math.rad(0)), .1)
  910. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-1 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1)
  911. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1)
  912. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1)
  913. RH.C0 = clerp(RH.C0, cn(1, -1 - 0.1 * math.cos(sine / 8), 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1)
  914. LH.C0 = clerp(LH.C0, cn(-1, -1 - 0.1 * math.cos(sine / 8), -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1)
  915. SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1)
  916. end
  917.  
  918.  
  919. if RootPart.Velocity.y < -1 then
  920. s.Pitch = .9
  921. s.Volume = .5
  922. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 1, -1.1) * angles(math.rad(-90), math.rad(0), math.rad(180)), .3)
  923. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-1 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1)
  924. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1)
  925. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1)
  926. RH.C0 = clerp(RH.C0, cn(1, -1 - 0.1 * math.cos(sine / 8), 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1)
  927. LH.C0 = clerp(LH.C0, cn(-1, -1 - 0.1 * math.cos(sine / 8), -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1)
  928. SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1) end
  929.  
  930. end
  931. if Torsovelocity > 1 then
  932. Climbanim = false
  933. end
  934. end
  935. attack = false
  936. end
  937. end
  938. Humanoid.Climbing:connect(onClimbing)
  939.  
  940.  
  941.  
  942. end
  943. end
  944.  
  945.  
  946. if #Effects > 0 then
  947. for e = 1, #Effects do
  948. if Effects[e] ~= nil then
  949. local Thing = Effects[e]
  950. if Thing ~= nil then
  951. local Part = Thing[1]
  952. local Mode = Thing[2]
  953. local Delay = Thing[3]
  954. local IncX = Thing[4]
  955. local IncY = Thing[5]
  956. local IncZ = Thing[6]
  957. if Thing[1].Transparency <= 1 then
  958. if Thing[2] == "Block1" then
  959. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  960. local Mesh = Thing[1].Mesh
  961. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  962. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  963. elseif Thing[2] == "Block2" then
  964. Thing[1].CFrame = Thing[1].CFrame+Vector3.new(0,-.0,0)
  965. local Mesh = Thing[7]
  966. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  967. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  968. elseif Thing[2] == "Block3" then
  969. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))+Vector3.new(0,.15,0)
  970. local Mesh = Thing[7]
  971. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  972. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  973. elseif Thing[2] == "Cylinder" then
  974. local Mesh = Thing[1].Mesh
  975. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  976. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  977. elseif Thing[2] == "Blood" then
  978. local Mesh = Thing[7]
  979. Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, .5, 0)
  980. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  981. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  982. elseif Thing[2] == "Elec" then
  983. local Mesh = Thing[1].Mesh
  984. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  985. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  986. elseif Thing[2] == "Disappear" then
  987. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  988. elseif Thing[2] == "Shatter" then
  989. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  990. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  991. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  992. Thing[6] = Thing[6] + Thing[5]
  993. end
  994. else
  995. Part.Parent = nil
  996. table.remove(Effects, e)
  997. end
  998. end
  999. end
  1000. end
  1001. end
  1002. end)
  1003.  
  1004.  
  1005. Effects = {
  1006. Block = {Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  1007.  
  1008. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  1009. prt.Anchored = true
  1010. prt.CFrame = cframe
  1011. local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1012. game:GetService("Debris"):AddItem(prt, 10)
  1013. if Type == 1 or Type == nil then
  1014. table.insert(Effects, {prt, "Block1", delay, x3, y3, z3, msh})
  1015. else
  1016. if Type == 2 then
  1017. table.insert(Effects, {prt, "Block2", delay, x3, y3, z3, msh})
  1018. else
  1019. table.insert(Effects, {prt, "Block3", delay, x3, y3, z3, msh})
  1020. end
  1021. end
  1022. end
  1023. }
  1024. ,
  1025. Sphere = {Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1026.  
  1027. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  1028. prt.Anchored = true
  1029. prt.CFrame = cframe
  1030. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1031. game:GetService("Debris"):AddItem(prt, 10)
  1032. table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh})
  1033. end
  1034. }
  1035. ,
  1036. Cylinder = {Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1037.  
  1038. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  1039. prt.Anchored = true
  1040. prt.CFrame = cframe
  1041. local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1042. game:GetService("Debris"):AddItem(prt, 10)
  1043. table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh})
  1044. end
  1045. }
  1046. ,
  1047. Wave = {Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1048.  
  1049. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  1050. prt.Anchored = true
  1051. prt.CFrame = cframe
  1052. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://431164262", Vector3.new(0, 0, 0), Vector3.new(x1/60, y1/60, z1/60))
  1053. game:GetService("Debris"):AddItem(prt, 10)
  1054. table.insert(Effects, {prt, "Cylinder", delay, x3/60, y3/60, z3/60, msh})
  1055. end
  1056. }
  1057. ,
  1058. Ring = {Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1059.  
  1060. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  1061. prt.Anchored = true
  1062. prt.CFrame = cframe
  1063. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1064. game:GetService("Debris"):AddItem(prt, 10)
  1065. table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh})
  1066. end
  1067. }
  1068. ,
  1069. Break = {Create = function(brickcolor, cframe, x1, y1, z1)
  1070.  
  1071. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  1072. prt.Anchored = true
  1073. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1074. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1075. local num = math.random(10, 50) / 1000
  1076. game:GetService("Debris"):AddItem(prt, 10)
  1077. table.insert(Effects, {prt, "Shatter", num, prt.CFrame, math.random() - math.random(), 0, math.random(50, 100) / 100})
  1078. end
  1079. }
  1080. }
  1081.  
  1082.  
  1083.  
  1084. RemoveOutlines = function(part)
  1085.  
  1086. part.TopSurface = 10
  1087. end
  1088.  
  1089. CreatePart = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  1090.  
  1091. local Part = Create("Part")({Parent = Parent, Reflectance = Reflectance, Transparency = Transparency, CanCollide = false, Locked = true, BrickColor = BrickColor.new(tostring(BColor)), Name = Name, Size = Size, Material = Material})
  1092. RemoveOutlines(Part)
  1093. return Part
  1094. end
  1095.  
  1096. CreateMesh = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  1097.  
  1098. local Msh = Create(Mesh)({Parent = Part, Offset = OffSet, Scale = Scale})
  1099. if Mesh == "SpecialMesh" then
  1100. Msh.MeshType = MeshType
  1101. Msh.MeshId = MeshId
  1102. end
  1103. return Msh
  1104. end
  1105.  
  1106. CreateWeld = function(Parent, Part0, Part1, C0, C1)
  1107.  
  1108. local Weld = Create("Weld")({Parent = Parent, Part0 = Part0, Part1 = Part1, C0 = C0, C1 = C1})
  1109. return Weld
  1110. end
  1111.  
  1112.  
  1113.  
  1114.  
  1115. WSHM = {'White',"Pastel light red"}
  1116. WSH = WSHM[math.random(1,#WSHM)]
  1117.  
  1118.  
  1119. IcePartFunk = function(HPart,aria,Min,Max)
  1120.  
  1121. IcePart = Instance.new("Part",HPart)
  1122. IcePart.Size = Vector3.new(math.random(Min, Max),math.random(Min, Max),math.random(Min, Max))
  1123. IcePart.CanCollide = false
  1124. IuW = Instance.new("Weld")
  1125. IuW.Name = "GuW"
  1126. IuW.Part0 = HPart
  1127. IuW.C0 = cn(math.random(-aria, aria),math.random(-aria, aria),math.random(-aria, aria))*angles( math.random(-180, 180),math.random(-180, 180),math.random(-180, 180))
  1128. IuW.C1 = cn(0, math.random(-aria/2, aria/2), 0)
  1129. IuW.Part1 = IcePart
  1130. IuW.Parent = HPart
  1131. IcePart.Transparency = .85
  1132. IcePart.Material= "Neon"
  1133. WSH = WSHM[math.random(1,#WSHM)]
  1134. IcePart.BrickColor = BrickColor.new(""..WSH)
  1135.  
  1136. RemoveOutlines(IcePart)
  1137. game:GetService("Debris"):AddItem(IuW, 4)
  1138. game:GetService("Debris"):AddItem(IcePart, 6)
  1139.  
  1140.  
  1141. end
  1142. --[[
  1143. GroundPartFunk2 = function(Hit,HPart,color,aria,Min,Max)
  1144.  
  1145. IcePart2 = Instance.new("Part",HPart)
  1146. IcePart2.Size = Vector3.new(math.random(Min, Max),math.random(Min, Max),math.random(Min, Max))
  1147. IcePart2.CanCollide = false
  1148. RemoveOutlines(IcePart2)
  1149. IcePart2.Anchored = true
  1150.  
  1151.  
  1152.  
  1153. IcePart2.CFrame=CFrame.new(Hit.Position* Vector3.new(math.random(-aria, aria),math.random(-aria, aria),math.random(-aria, aria)))
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160. IcePart2.Transparency = .85
  1161. IcePart2.Material= "Neon"
  1162.  
  1163. IcePart2.BrickColor = BrickColor.new(""..color)
  1164.  
  1165.  
  1166.  
  1167. game:GetService("Debris"):AddItem(IcePart2, 6)
  1168.  
  1169.  
  1170. end
  1171. --]]
  1172. GroundPartFunk2 = function(Hit,HPart,color,aria,Min,Max,num)
  1173.  
  1174. IcePart2 = Instance.new("Part",HPart)
  1175. IcePart2.Size = Vector3.new(math.random(Min, Max),math.random(Min, Max),math.random(Min, Max))
  1176. IcePart2.CanCollide = false
  1177. RemoveOutlines(IcePart2)
  1178. IcePart2.Anchored = true
  1179. game:GetService("Debris"):AddItem(IcePart2, .4)
  1180. IcePart2.Transparency = .3
  1181. IcePart2.Material= "Neon"
  1182. IcePart2.BrickColor = BrickColor.new(""..color)
  1183.  
  1184. IcePart2.CFrame=CFrame.new(Hit.Position+ Vector3.new(math.random(-aria, aria),math.random(-aria, 0),math.random(-aria, aria)))*angles(math.rad(math.random(-45, 45)),math.rad(math.random(-45, 45)),math.rad(math.random(-45, 45)))
  1185. for i = 0,num do
  1186. if num > 1 then
  1187. GroundPartFunk2(Hit,HPart,color,aria,Min,Max,0)
  1188. end
  1189. end
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201. end
  1202.  
  1203.  
  1204.  
  1205.  
  1206.  
  1207. SpikeMeshId = 1033714
  1208. local CreateSpike = function(Parent, Name, Color, Size, Material, Transparency, Scale)
  1209.  
  1210.  
  1211. local Part = Instance.new("Part", Parent)
  1212. Part.Name = Name
  1213. Part.BrickColor = BrickColor.new(Color)
  1214. Part.Size = Size
  1215. Part.Material = Material
  1216. Part.Transparency = Transparency
  1217. Part.CanCollide = false
  1218. RemoveOutlines(Part)
  1219.  
  1220. local Mesh = Instance.new("SpecialMesh", Part)
  1221. Mesh.MeshType = "Sphere"
  1222. Mesh.Scale = Scale
  1223.  
  1224. return Mesh and Part
  1225.  
  1226. end
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235. CFuncs = {
  1236. Part = {Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  1237.  
  1238. local Part = Create("Part")({Parent = Parent, Reflectance = Reflectance, Transparency = Transparency, CanCollide = false, Locked = true, BrickColor = BrickColor.new(tostring(BColor)), Name = Name, Size = Size, Material = Material})
  1239. RemoveOutlines(Part)
  1240. return Part
  1241. end
  1242. }
  1243. ,
  1244. Mesh = {Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  1245.  
  1246. local Msh = Create(Mesh)({Parent = Part, Offset = OffSet, Scale = Scale})
  1247. if Mesh == "SpecialMesh" then
  1248. Msh.MeshType = MeshType
  1249. Msh.MeshId = MeshId
  1250. end
  1251. return Msh
  1252. end
  1253. }
  1254. ,
  1255. Mesh = {Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  1256.  
  1257. local Msh = Create(Mesh)({Parent = Part, Offset = OffSet, Scale = Scale})
  1258. if Mesh == "SpecialMesh" then
  1259. Msh.MeshType = MeshType
  1260. Msh.MeshId = MeshId
  1261. end
  1262. return Msh
  1263. end
  1264. }
  1265. ,
  1266. Weld = {Create = function(Parent, Part0, Part1, C0, C1)
  1267.  
  1268. local Weld = Create("Weld")({Parent = Parent, Part0 = Part0, Part1 = Part1, C0 = C0, C1 = C1})
  1269. return Weld
  1270. end
  1271. }
  1272. ,
  1273. Sound = {Create = function(id, par, vol, pit)
  1274.  
  1275. coroutine.resume(coroutine.create(function()
  1276.  
  1277. local S = Create("Sound")({Volume = vol, Pitch = pit or 1, SoundId = id, Parent = par or workspace})
  1278. wait()
  1279. S:play()
  1280. game:GetService("Debris"):AddItem(S, 6)
  1281. end
  1282. ))
  1283. end
  1284. }
  1285. ,
  1286. ParticleEmitter = {Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  1287.  
  1288. local fp = Create("ParticleEmitter")({Parent = Parent, Color = ColorSequence.new(Color1, Color2), LightEmission = LightEmission, Size = Size, Texture = Texture, Transparency = Transparency, ZOffset = ZOffset, Acceleration = Accel, Drag = Drag, LockedToPart = LockedToPart, VelocityInheritance = VelocityInheritance, EmissionDirection = EmissionDirection, Enabled = Enabled, Lifetime = LifeTime, Rate = Rate, Rotation = Rotation, RotSpeed = RotSpeed, Speed = Speed, VelocitySpread = VelocitySpread})
  1289. return fp
  1290. end
  1291. }
  1292. }
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298. Damagefunc = function(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  1299.  
  1300. if hit.Parent == nil then
  1301. return
  1302. end
  1303. local h = hit.Parent:FindFirstChild("Humanoid")
  1304. for _,v in pairs(hit.Parent:children()) do
  1305. if v:IsA("Humanoid") then
  1306. h = v
  1307. end
  1308. end
  1309. if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  1310. if hit.Parent:findFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then
  1311. return
  1312. end
  1313. local c = Create("ObjectValue")({Name = "creator", Value = game:service("Players").LocalPlayer, Parent = h})
  1314. game:GetService("Debris"):AddItem(c, 0.5)
  1315. if HitSound ~= nil and HitPitch ~= nil then
  1316. CreateSound(HitSound, hit, 1, HitPitch)
  1317. end
  1318. local Damage = math.random(minim, maxim)
  1319. local blocked = false
  1320. local block = hit.Parent:findFirstChild("Block")
  1321. if block ~= nil and block.className == "IntValue" and block.Value > 0 then
  1322. blocked = true
  1323. block.Value = block.Value - 1
  1324. print(block.Value)
  1325. end
  1326. if blocked == false then
  1327. h.Health = h.Health - Damage
  1328. ShowDamage(Part.CFrame * CFrame.new(0, 0, Part.Size.Z / 2).p + Vector3.new(0, 1.5, 0), -Damage, 1.5, Part.BrickColor.Color)
  1329. else
  1330. h.Health = h.Health - Damage / 2
  1331. ShowDamage(Part.CFrame * CFrame.new(0, 0, Part.Size.Z / 2).p + Vector3.new(0, 1.5, 0), -Damage, 1.5, Part.BrickColor.Color)
  1332. end
  1333. if hit.Parent:FindFirstChild("Torso") ~= nil then
  1334. lasthit = hit.Parent.Torso
  1335. end
  1336. if Type == "Knockdown" then
  1337. local hum = hit.Parent.Humanoid
  1338. hum.PlatformStand = true
  1339. coroutine.resume(coroutine.create(function(HHumanoid)
  1340.  
  1341. swait(.2)
  1342. HHumanoid.PlatformStand = false
  1343. end
  1344. ), hum)
  1345. local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit
  1346. local bodvol = Create("BodyVelocity")({velocity = angle * knockback, P = 50, maxForce = Vector3.new(80000, 80000, 80000), Parent = hit})
  1347. local rl = Create("BodyAngularVelocity")({P = 3000, maxTorque = Vector3.new(5000, 5000, 5000) * 50, angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)), Parent = hit})
  1348. game:GetService("Debris"):AddItem(bodvol, 0.1)
  1349. game:GetService("Debris"):AddItem(rl, 0.1)
  1350. elseif Type == "Normal" then
  1351. local vp = Create("BodyVelocity")({P = 500, maxForce = Vector3.new(math.huge, 0, math.huge), velocity = Property.CFrame.lookVector * knockback})
  1352. if knockback > 0 then
  1353. vp.Parent = hit.Parent.Torso
  1354. end
  1355. game:GetService("Debris"):AddItem(vp, 0.5)
  1356. elseif Type == "Impale" then
  1357.  
  1358. local Spike = CreateSpike(Services.Workspace, "Ice Spike", "Really red", Vector3.new(1,2,1), "Neon", .2, Vector3.new(.5,25,.5))
  1359. Spike.Anchored = true
  1360. Spike.Rotation = Vector3.new(math.random(-45,45), 0 , math.random(-45,45))
  1361. Spike.Position = hit.Parent.Torso.Position
  1362.  
  1363. Services.Debris:AddItem(Spike, 4)
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370. CFuncs.Sound.Create("http://www.roblox.com/asset/?id=268249319", Spike, .8, 2)
  1371. hit.Parent.Humanoid.PlatformStand = true
  1372.  
  1373.  
  1374. swait(1)
  1375. hit.Parent.Humanoid.PlatformStand = false
  1376. elseif Type == "Up" then
  1377. local bodyVelocity = Create("BodyVelocity")({velocity = Vector3.new(0, 20, 0), P = 5000, maxForce = Vector3.new(8000, 8000, 8000), Parent = hit})
  1378. game:GetService("Debris"):AddItem(bodyVelocity, 0.1)
  1379. local bodyVelocity = Create("BodyVelocity")({velocity = Vector3.new(0, 20, 0), P = 5000, maxForce = Vector3.new(8000, 8000, 8000), Parent = hit})
  1380. game:GetService("Debris"):AddItem(bodyVelocity, .1)
  1381.  
  1382.  
  1383.  
  1384. elseif Type == "UltSlice" then
  1385.  
  1386. BlockEffect( BrickColor.new("Really red"), SwHandle.CFrame * cn(0, 1.8, 0), 16, 141, .5, 0,0,0, 0.01,2)
  1387. BlockEffect( BrickColor.new("Really red"), Head.CFrame, 21, 21, 21, 0,0,0, 0.01,2)
  1388. BlockEffect( BrickColor.new("Really red"), Torso.CFrame, 41, 41, 21, 0,0,0, 0.01,2)
  1389. BlockEffect( BrickColor.new("Really red"), RightArm.CFrame, 21, 41, 21, 0,0,0, 0.01,2)
  1390. BlockEffect( BrickColor.new("Really red"), LeftArm.CFrame, 21, 41, 21, 0,0,0, 0.01,2)
  1391. BlockEffect( BrickColor.new("Really red"), RightLeg.CFrame, 21, 41, 21, 0,0,0, 0.01,2)
  1392. BlockEffect( BrickColor.new("Really red"), LeftLeg.CFrame, 21, 41, 21, 0,0,0, 0.01,2)
  1393.  
  1394.  
  1395. elseif Type == "Slice" then
  1396. local bp2 = Create("BodyPosition")({P = 900, D = 1000, maxForce = Vector3.new(math.huge, math.huge, math.huge), position = hit.Parent.Head.Position, Parent = hit.Parent.Torso})
  1397. game:GetService("Debris"):AddItem(bp2, 1)
  1398.  
  1399. if hit.Parent:FindFirstChild("HumanoidRootPart") ~= nil then
  1400. for i = 1,10 do
  1401. Effects.Break.Create (BrickColor.new("Really red"), hit.Parent.HumanoidRootPart.CFrame, 10, .5, .5)
  1402.  
  1403.  
  1404. end
  1405. end
  1406.  
  1407.  
  1408.  
  1409.  
  1410. elseif Type == "Snare" then
  1411. local bp = Create("BodyPosition")({P = 900, D = 1000, maxForce = Vector3.new(math.huge, math.huge, math.huge), position = hit.Parent.Torso.Position, Parent = hit.Parent.Torso})
  1412. game:GetService("Debris"):AddItem(bp, 1)
  1413. elseif Type == "Slowness" then
  1414. local SpeedSave=hit.Parent.Humanoid.WalkSpeed
  1415.  
  1416. for i = 1,25 do
  1417. hit.Parent.Humanoid.WalkSpeed = 4
  1418. IcePartFunk(hit.Parent.Torso,.55,0.1,1)
  1419. end
  1420. wait(4)
  1421. hit.Parent.Humanoid.WalkSpeed = SpeedSave
  1422. elseif Type == "Firedmg" then
  1423.  
  1424. for i = 1,math.random(1, 6) do
  1425. if hit.Parent:FindFirstChild("Torso") ~= nil then
  1426. BlockEffect( BrickColor.new("Really red"), hit.Parent.Torso.CFrame, 20, 20, 20, 1.5, 1.5, 1.5, 0.05,3)
  1427. BlockEffect(BrickColor.new("Gold"), hit.Parent.Torso.CFrame, 20, 20, 20, 2, 2, 2, 0.05,3)
  1428. BlockEffect(BrickColor.new("Really black"), hit.Parent.Torso.CFrame, 0, 0, 0, 2, 2, 2, 0.035,3)
  1429.  
  1430.  
  1431.  
  1432. wait(.1)
  1433. end
  1434. end
  1435.  
  1436. elseif Type == "Freeze" then
  1437. local bp = Create("BodyPosition")({P = 900, D = 1000, maxForce = Vector3.new(math.huge, math.huge, math.huge), position = hit.Parent.Torso.Position, Parent = hit.Parent.Torso})
  1438. game:GetService("Debris"):AddItem(bp, 4)
  1439. for i=1,25 do
  1440. IcePartFunk(hit.Parent.Torso,1,1.5,2)
  1441. end
  1442. elseif Type == "Freeze2" then
  1443. local BodPos = Create("BodyPosition")({P = 50000, D = 1000, maxForce = Vector3.new(math.huge, math.huge, math.huge), position = hit.Parent.Torso.Position, Parent = hit.Parent.Torso})
  1444. local BodGy = Create("BodyGyro")({maxTorque = Vector3.new(400000, 400000, 400000) * math.huge, P = 20000, Parent = hit.Parent.Torso, cframe = hit.Parent.Torso.CFrame})
  1445. hit.Parent.Torso.Anchored = true
  1446. coroutine.resume(coroutine.create(function(Part)
  1447.  
  1448. swait(1.5)
  1449. Part.Anchored = false
  1450. end
  1451. ), hit.Parent.Torso)
  1452. game:GetService("Debris"):AddItem(BodPos, 3)
  1453. game:GetService("Debris"):AddItem(BodGy, 3)
  1454. end
  1455. local debounce = Create("BoolValue")({Name = "DebounceHit", Parent = hit.Parent, Value = true})
  1456. game:GetService("Debris"):AddItem(debounce, Delay)
  1457. c = Instance.new("ObjectValue")
  1458. c.Name = "creator"
  1459. c.Value = Player
  1460. c.Parent = h
  1461. game:GetService("Debris"):AddItem(c, 0.5)
  1462. end
  1463. end
  1464.  
  1465. ShowDamage = function(Pos, Text, Time, Color)
  1466.  
  1467. local Rate = 0.033333333333333
  1468. if not Pos then
  1469. local Pos = Vector3.new(0, 0, 0)
  1470. end
  1471. local Text = Text or ""
  1472. local Time = Time or 2
  1473. if not Color then
  1474. local Color = Color3.new(1, 0, 1)
  1475. end
  1476. local EffectPart = CreatePart(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
  1477. EffectPart.Anchored = true
  1478. local BillboardGui = Create("BillboardGui")({Size = UDim2.new(3, 0, 3, 0), Adornee = EffectPart, Parent = EffectPart})
  1479. local TextLabel = Create("TextLabel")({BackgroundTransparency = 1, Size = UDim2.new(1, 0, 1, 0), Text = Text, TextColor3 = Color, TextScaled = true, Font = Enum.Font.ArialBold, Parent = BillboardGui})
  1480. game.Debris:AddItem(EffectPart, Time + 0.1)
  1481. EffectPart.Parent = game:GetService("Workspace")
  1482. delay(0, function()
  1483.  
  1484. local Frames = Time / Rate
  1485. for Frame = 1, Frames do
  1486. wait(Rate)
  1487. local Percent = Frame / Frames
  1488. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  1489. TextLabel.TextTransparency = Percent
  1490. end
  1491. if EffectPart and EffectPart.Parent then
  1492. EffectPart:Destroy()
  1493. end
  1494. end
  1495. )
  1496. end
  1497.  
  1498. MagniDamage = function(Part, magni, mindam, maxdam, knock, Type)
  1499.  
  1500. for _,c in pairs(workspace:children()) do
  1501. local hum = c:findFirstChild("Humanoid")
  1502. if hum ~= nil then
  1503. local head = c:findFirstChild("Head")
  1504. if head ~= nil then
  1505. local targ = head.Position - Part.Position
  1506. local mag = targ.magnitude
  1507. if mag <= magni and c.Name ~= Player.Name then
  1508. Damagefunc(head, head, mindam, maxdam, knock, Type, RootPart, 0.1, "http://www.roblox.com/asset/?id=231917784", 1.2)
  1509. end
  1510. end
  1511. end
  1512. end
  1513. end
  1514. MagniKILL = function(Part, magni, knock, Type)
  1515.  
  1516. for _,c in pairs(workspace:children()) do
  1517. local hum = c:findFirstChild("Humanoid")
  1518. if hum ~= nil then
  1519. local head = c:findFirstChild("Head")
  1520. if head ~= nil then
  1521. local targ = head.Position - Part.Position
  1522. local mag = targ.magnitude
  1523. if mag <= magni and c.Name ~= Player.Name then
  1524. hum.Health = 0
  1525. end
  1526. end
  1527. end
  1528. end
  1529. end
  1530. EffectModel = Instance.new("Model", Character)
  1531. EffectModel.Name = "Effects"
  1532.  
  1533. BlockEffect = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  1534.  
  1535. local prt = CreatePart(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  1536. prt.Anchored = true
  1537. prt.CFrame = cframe
  1538. local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1539. game:GetService("Debris"):AddItem(prt, 10)
  1540. if Type == 1 or Type == nil then
  1541. table.insert(Effects, {prt, "Block1", delay, x3, y3, z3, msh})
  1542. else
  1543. if Type == 2 then
  1544. table.insert(Effects, {prt, "Block2", delay, x3, y3, z3, msh})
  1545. else
  1546. if Type == 3 then
  1547. table.insert(Effects, {prt, "Block3", delay, x3, y3, z3, msh})
  1548. end
  1549. end
  1550. end
  1551. end
  1552. CreateSound = function(id, par, vol, pit)
  1553.  
  1554. coroutine.resume(coroutine.create(function()
  1555.  
  1556. local sou = Instance.new("Sound", par or workspace)
  1557. sou.Volume = vol
  1558. sou.Pitch = pit or 1
  1559. sou.SoundId = id
  1560. swait()
  1561. sou:play()
  1562. game:GetService("Debris"):AddItem(sou, 6)
  1563. end
  1564. ))
  1565. end
  1566.  
  1567. Laser = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1568.  
  1569. local prt = CreatePart(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  1570. prt.Anchored = true
  1571. prt.CFrame = cframe
  1572. prt.Material = "Neon"
  1573. local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1574. game:GetService("Debris"):AddItem(prt, 10)
  1575. coroutine.resume(coroutine.create(function(Part, Mesh)
  1576.  
  1577. for i = 0, 6, delay do
  1578. swait()
  1579. Part.Transparency = i
  1580. Mesh.Scale = Mesh.Scale + Vector3.new(x3, y3, z3)
  1581. end
  1582. Part.Parent = nil
  1583. end
  1584. ), prt, msh)
  1585. end
  1586.  
  1587. shoottraildd = function(mouse, partt, SpreadAmount)
  1588.  
  1589. local SpreadVectors = Vector3.new(math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount/10, SpreadAmount/10), math.random(-SpreadAmount, SpreadAmount))
  1590. local MainPos = mouse + Vector3.new(0, 6, 0)+RootPart.CFrame.lookVector*-2
  1591. local MainPos2 = mouse + SpreadVectors
  1592. local MouseLook = CFrame.new((MainPos + MainPos2) / 2, MainPos2)
  1593. local speed = 100
  1594. local num = 1
  1595. coroutine.resume(coroutine.create(function()
  1596.  
  1597. repeat
  1598. swait()
  1599. local hit, pos = rayCast(MainPos, MouseLook.lookVector, speed, RootPart.Parent)
  1600. local mag = (MainPos - pos).magnitude
  1601. Laser(BrickColor.new("Really red"), CFrame.new((MainPos + pos) / 2, pos) * angles(1.57, 0, 0), 0, mag * (speed / (speed / 2)), 0, -0, 0, -0, 10)
  1602. MainPos = MainPos + MouseLook.lookVector * speed
  1603. num = num - 1
  1604. MouseLook = MouseLook * angles(math.rad(-1), 0, 0)
  1605. if hit ~= nil then
  1606. num = 0
  1607. local refpart = CreatePart(EffectModel, "Neon", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new())
  1608. refpart.Anchored = true
  1609. refpart.CFrame = CFrame.new(pos)
  1610. game:GetService("Debris"):AddItem(refpart, 2)
  1611. end
  1612. do
  1613. if num <= 0 then
  1614. local refpart = CreatePart(EffectModel, "Neon", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new())
  1615. refpart.Anchored = true
  1616. refpart.CFrame = CFrame.new(pos)
  1617. if hit ~= nil then
  1618.  
  1619.  
  1620.  
  1621. GroundPartFunk2(refpart,EffectModel,"Really red",1,.1,2,2)
  1622. BlockEffect( BrickColor.new("Really red"), refpart.CFrame, 70, 70, 70, -.5, -.5, -.5, 0.05)
  1623. -- BlockEffect(BrickColor.new("Gold"), refpart.CFrame, 1, 1, 1, 7, 7, 7, 0.07)
  1624. -- BlockEffect(BrickColor.new("Gold"), refpart.CFrame, 1, 1, 1, 7, 7, 7, 0.07)
  1625. MagniDamage(refpart, 6, 10, 25, 0, "Slice")
  1626. end
  1627. game:GetService("Debris"):AddItem(refpart, 0)
  1628. end
  1629. end
  1630. until num <= 0
  1631. end
  1632. ))
  1633. end
  1634.  
  1635. shoottraildd2 = function(mouse, partt, SpreadAmount)
  1636.  
  1637. local SpreadVectors = Vector3.new(math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount))
  1638. local MainPos = partt.Position
  1639. local MainPos2 = mouse + SpreadVectors
  1640. local MouseLook = CFrame.new((MainPos + MainPos2) / 2, MainPos2)
  1641. local speed = 1000
  1642. local num = 1
  1643. coroutine.resume(coroutine.create(function()
  1644.  
  1645. repeat
  1646. swait()
  1647. local hit, pos = rayCast(MainPos, MouseLook.lookVector, speed, RootPart.Parent)
  1648. local mag = (MainPos - pos).magnitude
  1649. Laser(BrickColor.new("Gold"), CFrame.new((MainPos + pos) / 2, pos) * angles(1.57, 0, 0), 1, mag * (speed / (speed / 2)), 1, -8.175, 0, -8.175, 0.15)
  1650. MainPos = MainPos + MouseLook.lookVector * speed
  1651. num = num - 1
  1652. MouseLook = MouseLook * angles(math.rad(-1), 0, 0)
  1653. if hit ~= nil then
  1654. num = 0
  1655. local refpart = CreatePart(EffectModel, "Neon", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new())
  1656. refpart.Anchored = true
  1657. refpart.CFrame = CFrame.new(pos)
  1658. game:GetService("Debris"):AddItem(refpart, 2)
  1659. end
  1660. do
  1661. if num <= 0 then
  1662. local refpart = CreatePart(EffectModel, "Neon", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new())
  1663. refpart.Anchored = true
  1664. refpart.CFrame = CFrame.new(pos)
  1665. if hit ~= nil then
  1666. CreateSound("http://www.roblox.com/asset/?id=514867425", refpart, 2, 1)
  1667. BlockEffect( BrickColor.new("Really red"), refpart.CFrame, 1, 1, 1, 86.5, 86.5, 86.5, 0.05)
  1668. BlockEffect(BrickColor.new("Gold"), refpart.CFrame, 1, 1, 1, 87, 87, 87, 0.05)
  1669. BlockEffect(BrickColor.new("Gold"), refpart.CFrame, 1, 1, 1, 87, 87, 87, 0.05)
  1670. MagniKILL(refpart, 80, 0, "Normal")
  1671. end
  1672. game:GetService("Debris"):AddItem(refpart, 0)
  1673. end
  1674. end
  1675. until num <= 0
  1676. end
  1677. ))
  1678. end
  1679.  
  1680. shoottraildd3 = function(mouse, partt, SpreadAmount, dmg)
  1681.  
  1682. local SpreadVectors = Vector3.new(math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount))
  1683. local MainPos = partt.Position
  1684. local MainPos2 = mouse + SpreadVectors
  1685. local MouseLook = CFrame.new((MainPos + MainPos2) / 2, MainPos2)
  1686. local speed = 200
  1687. local num = 0
  1688. coroutine.resume(coroutine.create(function()
  1689.  
  1690. repeat
  1691. swait()
  1692. local hit, pos = rayCast(MainPos, MouseLook.lookVector, speed, RootPart.Parent)
  1693. local mag = (MainPos - pos).magnitude
  1694. Laser(BrickColor.new("White"), CFrame.new((MainPos + pos) / 2, pos) * angles(1.57, 0, 0), 1, mag * (speed / (speed / 2)), 1, -0.375, 0, -0.375, 0.05)
  1695. MainPos = MainPos + MouseLook.lookVector * speed
  1696. num = num - 1
  1697. MouseLook = MouseLook * angles(math.rad(-1), 0, 0)
  1698. if hit ~= nil then
  1699. num = 0
  1700. local refpart = CreatePart(EffectModel, "Neon", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new())
  1701. refpart.Anchored = true
  1702. refpart.CFrame = CFrame.new(pos)
  1703. BlockEffect(BrickColor.new("Pastel light red"), refpart.CFrame, 1, 1, 1, 7, 7, 7, 0.05)
  1704. game:GetService("Debris"):AddItem(refpart, 2)
  1705. end
  1706. do
  1707. if num <= 0 then
  1708. local refpart = CreatePart(EffectModel, "Neon", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new())
  1709. refpart.Anchored = true
  1710. refpart.CFrame = CFrame.new(pos)
  1711. if hit ~= nil then
  1712. CreateSound("http://www.roblox.com/asset/?id=514867425", refpart, 2, 1)
  1713. BlockEffect(BrickColor.new("White"), refpart.CFrame, 1, 1, 1, 6.5, 6.5, 6.5, 0.05)
  1714. BlockEffect(BrickColor.new("Pastel light red"), refpart.CFrame, 1, 1, 1, 7, 7, 7, 0.05)
  1715.  
  1716.  
  1717. MagniDamage(refpart, 6, dmg, dmg, 0, "Slowness")
  1718.  
  1719. end
  1720. game:GetService("Debris"):AddItem(refpart, 0)
  1721. end
  1722. end
  1723. until num <= 0
  1724. end
  1725. ))
  1726. end
  1727.  
  1728. shoottraildd4 = function(mouse, partt, SpreadAmount, dmg)
  1729.  
  1730. local SpreadVectors = Vector3.new(math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount))
  1731. local MainPos = partt.Position
  1732. local MainPos2 = mouse + SpreadVectors
  1733. local MouseLook = CFrame.new((MainPos + MainPos2) / 2, MainPos2)
  1734. local speed = 150
  1735. local num = 1
  1736. coroutine.resume(coroutine.create(function()
  1737.  
  1738. repeat
  1739. swait()
  1740. local hit, pos = rayCast(MainPos, MouseLook.lookVector, speed, RootPart.Parent)
  1741. local mag = (MainPos - pos).magnitude
  1742. Laser(BrickColor.new("Gold"), CFrame.new((MainPos + pos) / 2, pos) * angles(1.57, 0, 0), 1, mag * (speed / (speed / 2)), 1, -1.175, 0, -1.175, 0.15)
  1743. MainPos = MainPos + MouseLook.lookVector * speed
  1744. num = num - 1
  1745. MouseLook = MouseLook * angles(math.rad(-1), 0, 0)
  1746. if hit ~= nil then
  1747. num = 0
  1748. local refpart = CreatePart(EffectModel, "Neon", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new())
  1749. refpart.Anchored = true
  1750. refpart.CFrame = CFrame.new(pos)
  1751. game:GetService("Debris"):AddItem(refpart, 2)
  1752. end
  1753. do
  1754. if num <= 0 then
  1755. local refpart = CreatePart(EffectModel, "Neon", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new())
  1756. refpart.Anchored = true
  1757. refpart.CFrame = CFrame.new(pos)
  1758. if hit ~= nil then
  1759. CreateSound("http://www.roblox.com/asset/?id=514867425", refpart, 2, 1)
  1760. BlockEffect( BrickColor.new("Really red"), refpart.CFrame, 1, 1, 1, 6.5, 6.5, 6.5, 0.05)
  1761. BlockEffect(BrickColor.new("Gold"), refpart.CFrame, 1, 1, 1, 7, 7, 7, 0.05)
  1762. BlockEffect(BrickColor.new("Gold"), refpart.CFrame, 1, 1, 1, 7, 7, 7, 0.05)
  1763. MagniDamage(refpart, 6, dmg, dmg, 0, "Normal")
  1764. end
  1765. game:GetService("Debris"):AddItem(refpart, 0)
  1766. end
  1767. end
  1768. until num <= 0
  1769. end
  1770. ))
  1771. end
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779. HitpartFunk3 = function(HPart3,Xv,Yv,Zv)
  1780.  
  1781. Hitpart3 = Instance.new("Part",HPart3)
  1782. RemoveOutlines(Hitpart3)
  1783. Hitpart3.Size = Vector3.new(1,1,1)
  1784. Hitpart3.CanCollide = false
  1785. HuW3 = Instance.new("Weld")
  1786. HuW3.Name = "GuW"
  1787. HuW3.Part0 = HPart3
  1788. HuW3.C0 = cn(Xv, Yv, Zv)
  1789. HuW3.C1 = cn(0, 0, 0)
  1790. HuW3.Part1 = Hitpart3
  1791. HuW3.Parent = HPart3
  1792. Hitpart3.Transparency = 1
  1793. game:GetService("Debris"):AddItem(Hitpart3, 20)
  1794. end
  1795.  
  1796. HitpartFunk2 = function(HPart2,Xv,Yv,Zv)
  1797.  
  1798. Hitpart2 = Instance.new("Part",HPart2)
  1799. RemoveOutlines(Hitpart2)
  1800. Hitpart2.Size = Vector3.new(1,1,1)
  1801. Hitpart2.CanCollide = false
  1802. HuW2 = Instance.new("Weld")
  1803. HuW2.Name = "GuW"
  1804. HuW2.Part0 = HPart2
  1805. HuW2.C0 = cn(Xv, Yv, Zv)
  1806. HuW2.C1 = cn(0, 0, 0)
  1807. HuW2.Part1 = Hitpart2
  1808. HuW2.Parent = HPart2
  1809. Hitpart2.Transparency = 1
  1810. game:GetService("Debris"):AddItem(Hitpart2, 20)
  1811. end
  1812.  
  1813.  
  1814. HitpartFunk = function(HPart,Min,Max,Xv,Yv,Zv,atype,kb)
  1815.  
  1816. Hitpart = Instance.new("Part",HPart)
  1817. RemoveOutlines(Hitpart)
  1818. Hitpart.Size = Vector3.new(1,1,1)
  1819. Hitpart.CanCollide = false
  1820. HuW = Instance.new("Weld")
  1821. HuW.Name = "GuW"
  1822. HuW.Part0 = HPart
  1823. HuW.C0 = cn(Xv, Yv, Zv)
  1824. HuW.C1 = cn(0, 0, 0)
  1825. HuW.Part1 = Hitpart
  1826. HuW.Parent = HPart
  1827. Hitpart.Transparency = 1
  1828. game:GetService("Debris"):AddItem(Hitpart2, 20)
  1829. MagniDamage(Hitpart, 4.5, Min, Max, kb, atype)
  1830.  
  1831. end
  1832. HitpartFunk4 = function(HPart,Min,Max,Xv,Yv,Zv,atype,kb)
  1833.  
  1834. Hitpart4 = Instance.new("Part",HPart)
  1835. RemoveOutlines(Hitpart4)
  1836. Hitpart4.Size = Vector3.new(1,1,1)
  1837. Hitpart4.CanCollide = false
  1838. HuW4 = Instance.new("Weld")
  1839. HuW4.Name = "HuW4"
  1840. HuW4.Part0 = HPart
  1841. HuW4.C0 = cn(Xv, Yv, Zv)
  1842. HuW4.C1 = cn(0, 0, 0)
  1843. HuW4.Part1 = Hitpart4
  1844. HuW4.Parent = HPart
  1845. Hitpart4.Transparency = 1
  1846. game:GetService("Debris"):AddItem(Hitpart4, 1.5)
  1847. MagniDamage(Hitpart4, 6.5, Min, Max, kb, atype)
  1848.  
  1849. end
  1850.  
  1851.  
  1852. HitboxFunction = function(Pose,lifetime,siz1,siz2,siz3,Radie,Min,Max,kb,atype)
  1853.  
  1854. Hitboxpart = Instance.new("Part",Character)
  1855. RemoveOutlines(Hitboxpart)
  1856. Hitboxpart.Size = Vector3.new(siz1,siz2,siz3)
  1857. Hitboxpart.CanCollide = false
  1858. Hitboxpart.Transparency = 1
  1859. Hitboxpart.Anchored = true
  1860. Hitboxpart.CFrame = Pose
  1861. game:GetService("Debris"):AddItem(Hitboxpart, lifetime)
  1862. MagniDamage(Hitboxpart, Radie, Min, Max, kb, atype)
  1863.  
  1864. end
  1865.  
  1866.  
  1867. wait2 = false
  1868.  
  1869.  
  1870. combo = 1
  1871.  
  1872.  
  1873.  
  1874.  
  1875. duljump = false
  1876. duljump2 = false
  1877. jumpatck = false
  1878. mouse.KeyDown:connect(function(k)
  1879. if k == "0" then
  1880.  
  1881. Runkey = true
  1882.  
  1883. end
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894. if k == "e" and attack == false then
  1895. attack = true
  1896.  
  1897. Humanoid.WalkSpeed = 0
  1898.  
  1899. CreateSound("http://www.roblox.com/asset/?id=135305162", Torso, 2, 1)
  1900.  
  1901. for i = 0, 2, 0.1 do
  1902. swait()
  1903.  
  1904. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  1905. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-30 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1)
  1906. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(135 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.2)
  1907. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(135 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.2)
  1908. RH.C0 = clerp(RH.C0, cn(1, -1 - 0.1 * math.cos(sine / 8), 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1)
  1909. LH.C0 = clerp(LH.C0, cn(-1, -1 - 0.1 * math.cos(sine / 8), -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1)
  1910. SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1)
  1911.  
  1912.  
  1913.  
  1914. end
  1915.  
  1916. for i = 0, 4, 0.1 do
  1917. swait()
  1918.  
  1919. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  1920. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-0 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1)
  1921. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(25)), 0.05)
  1922. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-25)), 0.05)
  1923. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1)
  1924. LH.C0 = clerp(LH.C0, cn(-1, -1, -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1)
  1925. SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1)
  1926.  
  1927.  
  1928.  
  1929. end
  1930. for i = 0, 1 do
  1931. for i = 0, 1, 0.1 do
  1932. swait()
  1933.  
  1934. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  1935. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-30 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1)
  1936. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1)
  1937. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1)
  1938. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1)
  1939. LH.C0 = clerp(LH.C0, cn(-1, -1 ,0)* LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1)
  1940. SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1)
  1941.  
  1942.  
  1943.  
  1944. end
  1945. for i = 0, 1, 0.1 do
  1946. swait()
  1947.  
  1948. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  1949. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-15 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1)
  1950. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1)
  1951. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1)
  1952. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1)
  1953. LH.C0 = clerp(LH.C0, cn(-1, -1, -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1)
  1954. SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1)
  1955.  
  1956.  
  1957.  
  1958. end
  1959. end
  1960.  
  1961. Humanoid.WalkSpeed = 16
  1962.  
  1963. attack = false
  1964.  
  1965.  
  1966.  
  1967.  
  1968. end
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986. end)
  1987. hitwait = false
  1988. function onTouch(part)
  1989.  
  1990. local humanoid = part.Parent:findFirstChild("Humanoid")
  1991. local model = part.Parent
  1992. local torso = part.Parent:FindFirstChild("Torso")
  1993. local head = part.Parent:findFirstChild("Head")
  1994. local leftleg = part.Parent:findFirstChild("Left Leg")
  1995. local rightleg = part.Parent:findFirstChild("Right Leg")
  1996. local leftarm = part.Parent:findFirstChild("Left Arm")
  1997. local rightarm = part.Parent:findFirstChild("Right Arm")
  1998.  
  1999. if hitwait == false and attack == false and model.Name == "Effects" == false and Runkey == true then
  2000.  
  2001. hitwait = true
  2002.  
  2003.  
  2004.  
  2005.  
  2006. if (humanoid ~=nil) and humanoid.Health >0.01 and Torsovelocity > 1 then
  2007.  
  2008. if IKM == true then
  2009. Effects.Sphere.Create(BrickColor.new("Really black"), FrontPart.CFrame * cn(0, -0, 0), 50, 50, 50, 40,40,40, 0.1)
  2010. Effects.Sphere.Create(BrickColor.new("Really red"), FrontPart.CFrame * cn(0, -0, 0), 50, 50, 50, 20,20,20, 0.05)
  2011. model:BreakJoints()
  2012.  
  2013. else
  2014. Effects.Sphere.Create(BrickColor.new("White"), FrontPart.CFrame * cn(0, -0, 2), 100, 100, .1, 12,12,0, 0.1)
  2015. Effects.Sphere.Create(BrickColor.new("White"), FrontPart.CFrame * cn(0, -0, 2), 100, 100, 20, 1,1,1, 0.08)
  2016. MagniDamage(FrontPart, 6.5, 6, 6, .3, "Knockdown")
  2017.  
  2018. end
  2019.  
  2020. attack = true
  2021. Humanoid.WalkSpeed = 0
  2022. local bodyVelocity2 = Create("BodyVelocity")({velocity = Vector3.new(0, 1, 0)-RootPart.CFrame.lookVector*1500, P = 50000, maxForce = Vector3.new(80000, 80000, 80000), Parent = Torso})
  2023.  
  2024. game:GetService("Debris"):AddItem(bodyVelocity2, 0.11)
  2025.  
  2026. for i = 0, .5, 0.1 do
  2027. swait()
  2028.  
  2029. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 1, -0.5) * angles(math.rad(1), math.rad(0), math.rad(0)), .2)
  2030. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-30 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1)
  2031. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.2)
  2032. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.2)
  2033. RH.C0 = clerp(RH.C0, cn(1, -1 - 0.1 * math.cos(sine / 8), 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1)
  2034. LH.C0 = clerp(LH.C0, cn(-1, -1 - 0.1 * math.cos(sine / 8), -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1)
  2035. SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.3) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.3)
  2036.  
  2037.  
  2038.  
  2039. end
  2040.  
  2041.  
  2042. Humanoid.WalkSpeed = 16
  2043. end
  2044. attack = false
  2045. wait(.08)
  2046. hitwait = false
  2047. end
  2048.  
  2049. end
  2050. FrontPart.Touched:connect(onTouch)
  2051.  
  2052.  
  2053.  
  2054. mouse.KeyUp:connect(function(k)
  2055. if k == "0"then
  2056. Runkey = false
  2057.  
  2058. end
  2059.  
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065. end)
  2066.  
  2067. humHsave = Humanoid.Health
  2068. function GainCharge(Humanoid)
  2069. if Humanoid.Health == 0 then
  2070. equipped = false
  2071. end
  2072. if blocking == true then
  2073.  
  2074. humDsave = Humanoid.Health
  2075. humDsave = humHsave - humDsave
  2076. if humDsave >0.01 then
  2077.  
  2078. CFuncs.Sound.Create("http://www.roblox.com/asset/?id=260433850", Torso, 1, .5)
  2079. BlockEffect( BrickColor.new("Really red"), Torso.CFrame, 42, 42, 22, 0.1,0.1,0.1, 0.02,2)
  2080. BlockEffect( BrickColor.new("Really red"), RightArm.CFrame, 22, 42, 22, 0.1,0.1,0.1, 0.02,2)
  2081. BlockEffect( BrickColor.new("Really red"), LeftArm.CFrame, 22, 42, 22, 0.1,0.1,0.1, 0.02,2)
  2082. BlockEffect( BrickColor.new("Really red"), RightLeg.CFrame, 22, 42, 22, 0.1,0.1,0.1, 0.02,2)
  2083. BlockEffect( BrickColor.new("Really red"), LeftLeg.CFrame, 22, 42, 22, 0.1,0.1,0.1, 0.02,2)
  2084. humDsave = humDsave/3
  2085. end
  2086. if humDsave <0 then
  2087.  
  2088.  
  2089. Effects.Sphere.Create(BrickColor.new("Lime green"), RootPart.CFrame * cn(0, -2.97, 0), 10, 5, 10, 15,-.1,15, 0.05)
  2090. --[[
  2091. BlockEffect( BrickColor.new("Lime green"), Torso.CFrame, 41, 41, 21, 0,0,0, 0.1,2)
  2092. BlockEffect( BrickColor.new("Lime green"), RightArm.CFrame, 21, 41, 21, 0,0,0, 0.1,2)
  2093. BlockEffect( BrickColor.new("Lime green"), LeftArm.CFrame, 21, 41, 21, 0,0,0, 0.1,2)
  2094. BlockEffect( BrickColor.new("Lime green"), RightLeg.CFrame, 21, 41, 21, 0,0,0, 0.1,2)
  2095. BlockEffect( BrickColor.new("Lime green"), LeftLeg.CFrame, 21, 41, 21, 0,0,0, 0.1,2)
  2096. --]]
  2097. humDsave = humDsave*2.5
  2098. end
  2099.  
  2100. humHsave = humHsave - humDsave
  2101.  
  2102.  
  2103.  
  2104.  
  2105. end
  2106.  
  2107. end
  2108.  
  2109. Humanoid.HealthChanged:connect(function() GainCharge(Humanoid) end)
  2110.  
  2111.  
  2112. OnDeath = function()
  2113.  
  2114. equipped = false
  2115.  
  2116.  
  2117.  
  2118. end
  2119.  
  2120. Humanoid.Died:connect(function()OnDeath(Character)end)
  2121.  
  2122.  
  2123.  
  2124. print('Created By Draconix')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement