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