SHOW:
|
|
- or go back to the newest paste.
1 | print([[ | |
2 | ___________________________________ | |
3 | ||
4 | - | Kyutatsuki13's Chara script |
4 | + | ERROR_WHILE_RECIVE_INFORMATION |
5 | - | Build 0002 |
5 | + | |
6 | - | Don't even mind why I did this, it was a challenge ! |
6 | + | |
7 | ||
8 | ||
9 | warn("Little edit loaded :3") | |
10 | ||
11 | local p = game:GetService("Players").LocalPlayer | |
12 | - | warn("You're whitelisted, "..game:GetService("Players").LocalPlayer.Name.." :)") |
12 | + | |
13 | local mouse = p:GetMouse() | |
14 | local larm = char:WaitForChild("Left Arm") | |
15 | local rarm = char:WaitForChild("Right Arm") | |
16 | local lleg = char:WaitForChild("Left Leg") | |
17 | local rleg = char:WaitForChild("Right Leg") | |
18 | local hed = char:WaitForChild("Head") | |
19 | local torso = char:WaitForChild("Torso") | |
20 | local root = char:WaitForChild("HumanoidRootPart") | |
21 | local hum = char:FindFirstChildOfClass("Humanoid") | |
22 | local debris = game:GetService("Debris") | |
23 | local input = game:GetService("UserInputService") | |
24 | local run = game:GetService("RunService") | |
25 | local rs = run.RenderStepped | |
26 | local wingpose = "Idle" | |
27 | local maincol = Color3.new(0,0,0) | |
28 | local maincol2 = Color3.new(128,128,128) | |
29 | local DebrisModel = Instance.new("Model",char) | |
30 | DebrisModel.Name = "Debris" | |
31 | repeat rs:wait() until p.CharacterAppearanceLoaded | |
32 | local EndPos = mouse.Hit.p | |
33 | local Hit = {} | |
34 | local HealthBarParts = Instance.new("Folder", char) | |
35 | HealthBarParts.Name = "BlockdomHealthBar" | |
36 | partEffects, AttackHas, AttackNeeded, AttackCan = {}, {}, {}, {} | |
37 | Effects = Instance.new("Folder", char) | |
38 | Effects.Name = "Effects" | |
39 | noidle = false | |
40 | shift = false | |
41 | control = false | |
42 | no_nosound_able = false | |
43 | kills = 0 | |
44 | local BlockSpeed = 0.2 -- Lower = Slower, Higher = Faster [0.0001 - 1] | |
45 | hum.MaxHealth = 10000 | |
46 | hum.Health = 10000 | |
47 | Player = game.Players.LocalPlayer | |
48 | Character = Player.Character | |
49 | Torso = Character.Torso | |
50 | Humanoid = Character.Humanoid | |
51 | ---------------------------------------------------------------------------- | |
52 | ||
53 | function rswait(value) | |
54 | if value ~= nil and value ~= 0 then | |
55 | for i=1,value do | |
56 | rs:wait() | |
57 | end | |
58 | else | |
59 | rs:wait() | |
60 | end | |
61 | end | |
62 | ||
63 | ---------------------------------------------------------------------------- | |
64 | ||
65 | local timeposition = 0 | |
66 | ||
67 | function music(id) | |
68 | if not torso:FindFirstChild("MusicRuin") then | |
69 | soundz = Instance.new("Sound",torso) | |
70 | end | |
71 | soundz.Volume = 10 | |
72 | soundz.Name = "MusicRuin" | |
73 | soundz.Looped = true | |
74 | soundz.PlaybackSpeed = 1 | |
75 | soundz.SoundId = "rbxassetid://"..id | |
76 | soundz:Stop() | |
77 | soundz:Play() | |
78 | if no_nosound_able == true then | |
79 | soundz.TimePosition = timeposition | |
80 | end | |
81 | end | |
82 | ||
83 | ---------------------------------------------------------------------------- | |
84 | ||
85 | function lerp(a, b, t) | |
86 | return a + (b - a)*t | |
87 | end | |
88 | ||
89 | ---------------------------------------------------------------------------- | |
90 | ||
91 | function Lerp(c1,c2,al) | |
92 | local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()} | |
93 | local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()} | |
94 | for i,v in pairs(com1) do | |
95 | com1[i] = v+(com2[i]-v)*al | |
96 | end | |
97 | return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1))) | |
98 | end | |
99 | ||
100 | ---------------------------------------------------------------------------- | |
101 | ||
102 | function slerp(a, b, t) | |
103 | dot = a:Dot(b) | |
104 | if dot > 0.99999 or dot < -0.99999 then | |
105 | return t <= 0.5 and a or b | |
106 | else | |
107 | r = math.acos(dot) | |
108 | return (a*math.sin((1 - t)*r) + b*math.sin(t*r)) / math.sin(r) | |
109 | end | |
110 | end | |
111 | ||
112 | ---------------------------------------------------------------------------- | |
113 | ||
114 | function clerp(c1,c2,al) | |
115 | ||
116 | local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()} | |
117 | ||
118 | local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()} | |
119 | ||
120 | for i,v in pairs(com1) do | |
121 | ||
122 | com1[i] = lerp(v,com2[i],al) | |
123 | ||
124 | end | |
125 | ||
126 | return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1))) | |
127 | ||
128 | end | |
129 | ||
130 | ---------------------------------------------------------------------------- | |
131 | ||
132 | function findAllNearestTorso(pos,dist) | |
133 | local list = workspace:children() | |
134 | local torso = {} | |
135 | local temp = nil | |
136 | local human = nil | |
137 | local temp2 = nil | |
138 | for x = 1, #list do | |
139 | temp2 = list[x] | |
140 | if (temp2.className == "Model") and (temp2 ~= char) then | |
141 | temp = temp2:findFirstChild("Torso") | |
142 | human = temp2:findFirstChildOfClass("Humanoid") | |
143 | if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then | |
144 | if (temp.Position - pos).magnitude < dist then | |
145 | table.insert(torso,temp) | |
146 | dist = (temp.Position - pos).magnitude | |
147 | end | |
148 | end | |
149 | end | |
150 | end | |
151 | return torso | |
152 | end | |
153 | ||
154 | ---------------------------------------------------------------------------- | |
155 | ||
156 | function checkIfNotPlayer(model) | |
157 | if model.CanCollide == true and model ~= char and model.Parent ~= char and model.Parent.Parent ~= char and model.Parent.Parent ~= char and model.Parent ~= DebrisModel and model.Parent.Parent ~= DebrisModel and model.Parent.Parent.Parent ~= DebrisModel and model ~= wings and model.Parent ~= wings and model.Parent.Parent ~= wings then | |
158 | return true | |
159 | else | |
160 | return false | |
161 | end | |
162 | end | |
163 | ||
164 | ---------------------------------------------------------------------------- | |
165 | ||
166 | function newWeld(wp0, wp1, wc0x, wc0y, wc0z) | |
167 | ||
168 | local wld = Instance.new("Weld", wp1) | |
169 | ||
170 | wld.Part0 = wp0 | |
171 | ||
172 | wld.Part1 = wp1 | |
173 | ||
174 | wld.C0 = CFrame.new(wc0x, wc0y, wc0z) | |
175 | ||
176 | return wld | |
177 | ||
178 | end | |
179 | ||
180 | function weld(model) | |
181 | local parts,last = {} | |
182 | local function scan(parent) | |
183 | for _,v in pairs(parent:GetChildren()) do | |
184 | if (v:IsA("BasePart")) then | |
185 | if (last) then | |
186 | local w = Instance.new("Weld") | |
187 | w.Name = ("%s_Weld"):format(v.Name) | |
188 | w.Part0,w.Part1 = last,v | |
189 | w.C0 = last.CFrame:inverse() | |
190 | w.C1 = v.CFrame:inverse() | |
191 | w.Parent = last | |
192 | end | |
193 | last = v | |
194 | table.insert(parts,v) | |
195 | end | |
196 | scan(v) | |
197 | end | |
198 | end | |
199 | scan(model) | |
200 | for _,v in pairs(parts) do | |
201 | v.Anchored = false | |
202 | v.Locked = true | |
203 | v.Anchored = false | |
204 | v.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
205 | v.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
206 | v.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
207 | v.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
208 | v.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
209 | v.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
210 | v.CustomPhysicalProperties = PhysicalProperties.new(0,0,0) | |
211 | end | |
212 | end | |
213 | function newPart(par, brick, transp, anch, canc, size, name, mat, ref) | |
214 | local p = Instance.new("Part") | |
215 | p.BrickColor = brick | |
216 | p.Transparency = transp | |
217 | p.Material = mat and mat or "Neon" | |
218 | p.Reflectance = ref and ref or 0 | |
219 | p.Anchored = anch | |
220 | p.CanCollide = canc | |
221 | p.Size = size | |
222 | p.TopSurface, p.BottomSurface, p.LeftSurface, p.RightSurface, p.FrontSurface, p.BackSurface = 10, 10, 10, 10, 10, 10 | |
223 | p.Name = name | |
224 | p.CFrame = root.CFrame | |
225 | p.Parent = par | |
226 | return p | |
227 | end | |
228 | function mesh(Mesh, part, meshtype, meshid, offset, scale) | |
229 | local mesh = Instance.new(Mesh) | |
230 | mesh.Parent = part | |
231 | if Mesh == "SpecialMesh" then | |
232 | mesh.MeshType = meshtype | |
233 | if meshid then | |
234 | mesh.MeshId = "http://www.roblox.com/asset/?id=" .. meshid | |
235 | end | |
236 | end | |
237 | if offset then | |
238 | mesh.Offset = offset | |
239 | end | |
240 | mesh.Scale = scale | |
241 | return mesh | |
242 | end | |
243 | ArtificialHB = Instance.new("BindableEvent", script) | |
244 | ArtificialHB.Name = "Heartbeat" | |
245 | script:WaitForChild("Heartbeat") | |
246 | script:WaitForChild("Heartbeat") | |
247 | frame = 0.025 | |
248 | tf = 0 | |
249 | allowframeloss = true | |
250 | tossremainder = false | |
251 | lastframe = tick() | |
252 | script.Heartbeat:Fire() | |
253 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
254 | tf = tf + s | |
255 | if tf >= frame then | |
256 | if allowframeloss then | |
257 | script.Heartbeat:Fire() | |
258 | lastframe = tick() | |
259 | else | |
260 | for i = 1, math.floor(tf / frame) do | |
261 | script.Heartbeat:Fire() | |
262 | end | |
263 | lastframe = tick() | |
264 | end | |
265 | if tossremainder then | |
266 | tf = 0 | |
267 | else | |
268 | tf = tf - frame * math.floor(tf / frame) | |
269 | end | |
270 | end | |
271 | end) | |
272 | function swait(num) | |
273 | if num == 0 or num == nil then | |
274 | ArtificialHB.Event:wait() | |
275 | else | |
276 | for i = 0, num do | |
277 | ArtificialHB.Event:wait() | |
278 | end | |
279 | end | |
280 | end | |
281 | function findCloseHumanoid(centre, distance) | |
282 | local tab = {} | |
283 | for _, child in pairs(game.Workspace:GetChildren()) do | |
284 | if child:findFirstChild("Humanoid") and child:findFirstChild("Humanoid") ~= Humanoid and child:findFirstChild("Torso") then | |
285 | local vtors = child.Torso | |
286 | local mag = math.abs((vtors.Position - centre).magnitude) | |
287 | if distance >= mag then | |
288 | table.insert(tab, child.Humanoid) | |
289 | end | |
290 | end | |
291 | end | |
292 | return tab | |
293 | end | |
294 | function magic(type, thing) | |
295 | local magicBlock = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay, t) | |
296 | local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "Neon", cframe) | |
297 | prt.CFrame = cframe | |
298 | local msh = mesh("BlockMesh", prt, nil, nil, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
299 | game:GetService("Debris"):AddItem(prt, 8) | |
300 | if t == 1 or t == nil then | |
301 | table.insert(partEffects, { | |
302 | prt, | |
303 | "Block1", | |
304 | delay, | |
305 | x3, | |
306 | y3, | |
307 | z3, | |
308 | msh | |
309 | }) | |
310 | elseif t == 2 then | |
311 | table.insert(partEffects, { | |
312 | prt, | |
313 | "Block2", | |
314 | delay, | |
315 | x3, | |
316 | y3, | |
317 | z3, | |
318 | msh | |
319 | }) | |
320 | end | |
321 | end | |
322 | local magicCylinder = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay) | |
323 | local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "Neon", cframe) | |
324 | local msh = mesh("CylinderMesh", prt, nil, nil, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
325 | game:GetService("Debris"):AddItem(prt, 8) | |
326 | table.insert(partEffects, { | |
327 | prt, | |
328 | "Cylinder", | |
329 | delay, | |
330 | x3, | |
331 | y3, | |
332 | z3, | |
333 | msh | |
334 | }) | |
335 | end | |
336 | local magicSphere = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay) | |
337 | local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "Neon", cframe) | |
338 | local msh = mesh("SpecialMesh", prt, "Sphere", nil, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
339 | game:GetService("Debris"):AddItem(prt, 8) | |
340 | table.insert(partEffects, { | |
341 | prt, | |
342 | "Cylinder", | |
343 | delay, | |
344 | x3, | |
345 | y3, | |
346 | z3, | |
347 | msh | |
348 | }) | |
349 | end | |
350 | local magicRing = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay) | |
351 | local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "Neon", cframe) | |
352 | prt.Anchored = true | |
353 | prt.CFrame = cframe | |
354 | local msh = mesh("SpecialMesh", prt, "FileMesh", 3270017, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
355 | game:GetService("Debris"):AddItem(prt, 2) | |
356 | coroutine.resume(coroutine.create(function(Part, Mesh, num) | |
357 | for i = 0, 1, delay do | |
358 | swait() | |
359 | Part.Transparency = i | |
360 | Mesh.Scale = Mesh.Scale + Vector3.new(x3, y3, z3) | |
361 | end | |
362 | Part:Destroy() | |
363 | end), prt, msh, (math.random(0, 1) + math.random()) / 5) | |
364 | end | |
365 | local magicSlash = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay) | |
366 | local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", cframe) | |
367 | prt.Anchored = true | |
368 | prt.CFrame = cframe | |
369 | local msh = mesh("SpecialMesh", prt, "FileMesh", 20329976, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
370 | game:GetService("Debris"):AddItem(prt, 2) | |
371 | coroutine.resume(coroutine.create(function(Part, Mesh, num) | |
372 | for i = 0, 1, delay do | |
373 | - | p:ClearCharacterAppearance() |
373 | + | swait() |
374 | Part.Transparency = i | |
375 | Mesh.Scale = Mesh.Scale + Vector3.new(x3, y3, z3) | |
376 | end | |
377 | - | music(540857600) |
377 | + | Part:Destroy() |
378 | end), prt, msh, (math.random(0, 1) + math.random()) / 5) | |
379 | end | |
380 | local par = thing[1] | |
381 | local brick = thing[2] | |
382 | local cframe = thing[3] | |
383 | local x1 = thing[4] | |
384 | local y1 = thing[5] | |
385 | local z1 = thing[6] | |
386 | local x3 = thing[7] | |
387 | local y3 = thing[8] | |
388 | local z3 = thing[9] | |
389 | local delay = thing[10] | |
390 | local t = thing[11] | |
391 | if type == "Block" or type == 1 then | |
392 | magicBlock(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11]) | |
393 | elseif type == "Cylinder" or type == 2 then | |
394 | magicCylinder(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11]) | |
395 | elseif type == "Sphere" or type == 3 then | |
396 | magicSphere(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11]) | |
397 | elseif type == "Ring" or type == 4 then | |
398 | magicRing(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11]) | |
399 | elseif type == "Slash" or type == 5 then | |
400 | magicSlash(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11]) | |
401 | end | |
402 | end | |
403 | function thread(f) | |
404 | coroutine.resume(coroutine.create(f)) | |
405 | end | |
406 | function clerp(a, b, t) | |
407 | local qa = { | |
408 | QuaternionFromCFrame(a) | |
409 | } | |
410 | local qb = { | |
411 | QuaternionFromCFrame(b) | |
412 | - | hair = Instance.new("Part",char) |
412 | + | } |
413 | - | hair.Color = Color3.fromRGB(30,10,0) |
413 | + | local ax, ay, az = a.x, a.y, a.z |
414 | - | hair.CanCollide = false |
414 | + | local bx, by, bz = b.x, b.y, b.z |
415 | - | meshhair = Instance.new("SpecialMesh",hair) |
415 | + | local _t = 1 - t |
416 | - | meshhair.MeshId = "rbxassetid://431809364" |
416 | + | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) |
417 | - | meshhair.Scale = Vector3.new(1,1,1)*1.1 |
417 | + | |
418 | - | newWeld(hed,hair,0,0.22,0) |
418 | + | function QuaternionFromCFrame(cf) |
419 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
420 | local trace = m00 + m11 + m22 | |
421 | if trace > 0 then | |
422 | - | Part2 = Instance.new("Part") |
422 | + | local s = math.sqrt(1 + trace) |
423 | local recip = 0.5 / s | |
424 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
425 | else | |
426 | local i = 0 | |
427 | if m00 < m11 then | |
428 | i = 1 | |
429 | end | |
430 | if m22 > (i == 0 and m00 or m11) then | |
431 | i = 2 | |
432 | - | Part1.Size = Vector3.new(2.02000022, 0.370000094, 1.01999998) |
432 | + | |
433 | - | Part1.CFrame = CFrame.new(87.5, 17.1749992, 83.5, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
433 | + | if i == 0 then |
434 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
435 | local recip = 0.5 / s | |
436 | - | Part1.Position = Vector3.new(87.5, 17.1749992, 83.5) |
436 | + | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip |
437 | - | Part1.Color = Color3.new(0, 1, 0) |
437 | + | elseif i == 1 then |
438 | - | Part2.Parent = Model0 |
438 | + | local s = math.sqrt(m11 - m22 - m00 + 1) |
439 | - | Part2.Anchored = true |
439 | + | local recip = 0.5 / s |
440 | - | Part2.CanCollide = false |
440 | + | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip |
441 | - | Part2.Size = Vector3.new(0.920000076, 0.110000037, 0.579999983) |
441 | + | elseif i == 2 then |
442 | - | Part2.CFrame = CFrame.new(88.0500031, 18.9549999, 83.2799988, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
442 | + | local s = math.sqrt(m22 - m00 - m11 + 1) |
443 | - | Part2.BottomSurface = Enum.SurfaceType.Smooth |
443 | + | local recip = 0.5 / s |
444 | - | Part2.TopSurface = Enum.SurfaceType.Smooth |
444 | + | return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip |
445 | - | Part2.Position = Vector3.new(88.0500031, 18.9549999, 83.2799988) |
445 | + | |
446 | - | Part2.Color = Color3.new(0, 1, 0) |
446 | + | |
447 | end | |
448 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
449 | local xs, ys, zs = x + x, y + y, z + z | |
450 | - | Part3.Size = Vector3.new(2.02000022, 0.590000093, 1.01999998) |
450 | + | local wx, wy, wz = w * xs, w * ys, w * zs |
451 | - | Part3.CFrame = CFrame.new(87.5, 17.6550007, 83.5, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
451 | + | local xx = x * xs |
452 | local xy = x * ys | |
453 | local xz = x * zs | |
454 | - | Part3.Position = Vector3.new(87.5, 17.6550007, 83.5) |
454 | + | local yy = y * ys |
455 | - | Part3.Color = Color3.new(0.992157, 0.917647, 0.552941) |
455 | + | local yz = y * zs |
456 | local zz = z * zs | |
457 | 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)) | |
458 | end | |
459 | - | Part4.Size = Vector3.new(2.02000022, 0.110000037, 0.439999968) |
459 | + | |
460 | - | Part4.CFrame = CFrame.new(87.5, 18.9549999, 83.7900009, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
460 | + | |
461 | function calculate(part,asd) | |
462 | local Head = hed | |
463 | - | Part4.Position = Vector3.new(87.5, 18.9549999, 83.7900009) |
463 | + | |
464 | - | Part4.Color = Color3.new(0, 1, 0) |
464 | + | |
465 | local MousePosition = mouse.Hit.p | |
466 | local ToMouse = (MousePosition - Head.Position).unit | |
467 | local Angle = math.acos(ToMouse:Dot(Vector3.new(0, 1, 0))) | |
468 | - | Part5.Size = Vector3.new(0.920000076, 0.110000037, 0.579999983) |
468 | + | |
469 | - | Part5.CFrame = CFrame.new(86.9499969, 18.9549999, 83.2799988, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
469 | + | |
470 | local Look = (Head.CFrame.lookVector * Vector3.new(1, 0, 1)).unit | |
471 | local LateralAngle = math.acos(ToMouseRightArm:Dot(Look)) | |
472 | - | Part5.Position = Vector3.new(86.9499969, 18.9549999, 83.2799988) |
472 | + | |
473 | - | Part5.Color = Color3.new(0, 1, 0) |
473 | + | |
474 | - | Part6.Name = "asd" |
474 | + | |
475 | local Cross = Head.CFrame.lookVector:Cross(ToMouseRightArm) | |
476 | - | Part6.Transparency = 1 |
476 | + | |
477 | LateralAngle = (math.pi / 2) | |
478 | local Torso = root | |
479 | - | Part6.Size = Vector3.new(2, 2, 1) |
479 | + | |
480 | - | Part6.CFrame = CFrame.new(87.5, 18, 83.5, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
480 | + | |
481 | if Point.X > -0 and RightArm == rarm then | |
482 | Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mouse.Hit.X,Torso.Position.Y,mouse.Hit.Z))*CFrame.Angles(0,math.rad(110),0) | |
483 | - | Part6.Position = Vector3.new(87.5, 18, 83.5) |
483 | + | |
484 | Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mouse.Hit.X,Torso.Position.Y,mouse.Hit.Z))*CFrame.Angles(0,math.rad(-110),0) | |
485 | end | |
486 | end | |
487 | - | Part7.Size = Vector3.new(2.02000022, 0.949999988, 1.01999998) |
487 | + | |
488 | - | Part7.CFrame = CFrame.new(87.5, 18.4249992, 83.5, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
488 | + | |
489 | LateralAngle = -LateralAngle | |
490 | end | |
491 | - | Part7.Position = Vector3.new(87.5, 18.4249992, 83.5) |
491 | + | |
492 | - | Part7.Color = Color3.new(0, 1, 0) |
492 | + | |
493 | ||
494 | - | newWeld(torso,Model0.asd) |
494 | + | |
495 | ||
496 | function sound(id,position,vol,pitch,start,finish) | |
497 | coroutine.resume(coroutine.create(function() | |
498 | - | Part2 = Instance.new("Part") |
498 | + | |
499 | local part = Instance.new("Part",workspace) | |
500 | part.Position = position | |
501 | part.Size = Vector3.new(0,0,0) | |
502 | part.CanCollide = false | |
503 | - | Part1.Size = Vector3.new(1.01999998, 1.91000009, 1.01999998) |
503 | + | |
504 | - | Part1.CFrame = CFrame.new(49.5, 18.0999985, 83.5, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
504 | + | |
505 | local sound = Instance.new("Sound",part) | |
506 | ||
507 | - | Part1.Position = Vector3.new(49.5, 18.0999985, 83.5) |
507 | + | |
508 | - | Part1.Color = Color3.new(0, 1, 0) |
508 | + | |
509 | - | Part2.Name = "asd" |
509 | + | |
510 | - | Part2.Parent = Model0 |
510 | + | |
511 | - | Part2.Transparency = 1 |
511 | + | |
512 | - | Part2.Anchored = true |
512 | + | |
513 | - | Part2.CanCollide = false |
513 | + | |
514 | - | Part2.Size = Vector3.new(1, 2, 1) |
514 | + | |
515 | - | Part2.CFrame = CFrame.new(49.5, 18.0450001, 83.5, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
515 | + | |
516 | - | Part2.BottomSurface = Enum.SurfaceType.Smooth |
516 | + | |
517 | - | Part2.TopSurface = Enum.SurfaceType.Smooth |
517 | + | |
518 | - | Part2.Position = Vector3.new(49.5, 18.0450001, 83.5) |
518 | + | |
519 | if start ~= nil then | |
520 | - | Model1=Model0:Clone() |
520 | + | |
521 | - | Model1.Parent=char |
521 | + | |
522 | - | newWeld(larm,Model0.asd,0,0,0) |
522 | + | |
523 | - | newWeld(rarm,Model1.asd,0,0,0) |
523 | + | |
524 | debris:AddItem(part,finish-start) | |
525 | else | |
526 | debris:AddItem(part,sound.TimeLength) | |
527 | - | Part2 = Instance.new("Part") |
527 | + | |
528 | ||
529 | sound:Play() | |
530 | ||
531 | return sound | |
532 | ||
533 | - | Part1.Size = Vector3.new(1.03999996, 0.27000007, 1.03999996) |
533 | + | |
534 | - | Part1.CFrame = CFrame.new(28, 17.125, 83.5, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
534 | + | |
535 | ||
536 | ---------------------------------------------------------------------------- | |
537 | - | Part1.Position = Vector3.new(28, 17.125, 83.5) |
537 | + | |
538 | - | Part1.Color = Color3.new(0.105882, 0.164706, 0.207843) |
538 | + | |
539 | - | Part2.Parent = Model0 |
539 | + | |
540 | - | Part2.Anchored = true |
540 | + | |
541 | - | Part2.CanCollide = false |
541 | + | |
542 | - | Part2.Size = Vector3.new(1.01999998, 1.91000009, 1.01999998) |
542 | + | |
543 | - | Part2.CFrame = CFrame.new(28, 18.0550003, 83.5, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
543 | + | |
544 | - | Part2.BottomSurface = Enum.SurfaceType.Smooth |
544 | + | |
545 | - | Part2.TopSurface = Enum.SurfaceType.Smooth |
545 | + | |
546 | - | Part2.Position = Vector3.new(28, 18.0550003, 83.5) |
546 | + | |
547 | - | Part2.Color = Color3.new(0.411765, 0.25098, 0.156863) |
547 | + | |
548 | - | Part3.Name = "asd" |
548 | + | |
549 | hum.CameraOffset = Vector3.new(math.random(-1,1),math.random(-1,1),math.random(-1,1))*(shaking/100) | |
550 | - | Part3.Transparency = 1 |
550 | + | |
551 | end) | |
552 | ||
553 | - | Part3.Size = Vector3.new(1, 2, 1) |
553 | + | |
554 | - | Part3.CFrame = CFrame.new(28, 18, 83.5, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
554 | + | |
555 | DebrisModel.Name = "DebrisModel" | |
556 | ||
557 | - | Part3.Position = Vector3.new(28, 18, 83.5) |
557 | + | |
558 | ||
559 | - | Model1=Model0:Clone() |
559 | + | |
560 | - | Model1.Parent=char |
560 | + | |
561 | - | newWeld(lleg,Model0.asd,0,0,0) |
561 | + | |
562 | - | newWeld(rleg,Model1.asd,0,0,0) |
562 | + | |
563 | part.Transparency = transparency | |
564 | part.Material = material | |
565 | part.Color = color | |
566 | part.CFrame = CFrame.new(position)*CFrame.Angles(math.rad(rotation.X),math.rad(rotation.Y),math.rad(rotation.Z)) | |
567 | ||
568 | local partmesh = Instance.new("SpecialMesh",part) | |
569 | if tonumber(mesh) == nil then partmesh.MeshType = mesh else partmesh.MeshId = "rbxassetid://"..mesh end | |
570 | partmesh.Scale = size | |
571 | ||
572 | local pvalue = Instance.new("Vector3Value",part) | |
573 | pvalue.Name = "Position" | |
574 | pvalue.Value = part.Position | |
575 | - | trail = Instance.new("Trail",HitBox) |
575 | + | |
576 | - | trail.Attachment0 = atch0 |
576 | + | |
577 | - | trail.Attachment1 = atch1 |
577 | + | |
578 | - | trail.Lifetime = 0.2 |
578 | + | |
579 | - | trail.Enabled = true |
579 | + | |
580 | - | trail.LightEmission = 1 |
580 | + | |
581 | - | trail.LightInfluence = 0 |
581 | + | |
582 | - | trail.Color = ColorSequence.new(Color3.new(1,0,0)) |
582 | + | |
583 | - | trail.Transparency = NumberSequence.new(0,1) |
583 | + | |
584 | local tvalue = Instance.new("NumberValue",part) | |
585 | tvalue.Name = "Transparency" | |
586 | tvalue.Value = transparencychange | |
587 | ||
588 | local avalue = Instance.new("NumberValue",part) | |
589 | avalue.Name = "Acceleration" | |
590 | avalue.Value = acceleration | |
591 | ||
592 | part.Name = "EFFECT" | |
593 | ||
594 | return part | |
595 | ||
596 | end | |
597 | ||
598 | game:GetService("RunService").RenderStepped:connect(function() | |
599 | ||
600 | ||
601 | if not plr.Character:FindFirstChild("DebrisModel") then | |
602 | DebrisModel = Instance.new("Model",plr.Character) | |
603 | DebrisModel.Name = "DebrisModel" | |
604 | end | |
605 | ||
606 | for i,v in pairs(DebrisModel:GetChildren()) do | |
607 | if v:IsA("BasePart") and v.Name == "EFFECT" then | |
608 | local pvalue = v:FindFirstChild("Position").Value | |
609 | local svalue = v:FindFirstChild("Size").Value | |
610 | local rvalue = v:FindFirstChild("Rotation").Value | |
611 | local tvalue = v:FindFirstChild("Transparency").Value | |
612 | local avalue = v:FindFirstChild("Acceleration").Value | |
613 | local mesh = v:FindFirstChild("Mesh") | |
614 | mesh.Scale = mesh.Scale + svalue | |
615 | v:FindFirstChild("Size").Value = v:FindFirstChild("Size").Value + (Vector3.new(1,1,1)*avalue) | |
616 | v.Transparency = v.Transparency + tvalue | |
617 | v.CFrame = v.CFrame*CFrame.Angles(math.rad(rvalue.X),math.rad(rvalue.Y),math.rad(rvalue.Z)) | |
618 | if v.Transparency >= 1 or mesh.Scale.X < 0 or mesh.Scale.Y < 0 or mesh.Scale.Z < 0 then | |
619 | v:Destroy() | |
620 | end | |
621 | end | |
622 | end | |
623 | ||
624 | ||
625 | end) | |
626 | ||
627 | ---------------------------------------------------------------------------- | |
628 | skin_color = BrickColor.new("Light orange") | |
629 | --hed:WaitForChild("face"):Destroy() | |
630 | ||
631 | ---------------------------------------------------------------------------- | |
632 | music(1306847940) | |
633 | equalizer = Instance.new("EqualizerSoundEffect",torso:FindFirstChild("MusicRuin")) | |
634 | ||
635 | local size = 1 | |
636 | ||
637 | newWeld(torso, larm, -1.5*size, 0.5*size, 0) | |
638 | larm.Weld.C1 = CFrame.new(0, 0.5*size, 0) | |
639 | newWeld(torso, rarm, 1.5*size, 0.5*size, 0) | |
640 | rarm.Weld.C1 = CFrame.new(0, 0.5*size, 0) | |
641 | newWeld(torso, hed, 0, 1.5*size, 0) | |
642 | newWeld(torso, lleg, -0.5*size, -1, 0) | |
643 | lleg.Weld.C1 = CFrame.new(0, 1*size, 0) | |
644 | newWeld(torso, rleg, 0.5*size, -1*size, 0) | |
645 | rleg.Weld.C1 = CFrame.new(0, 1*size, 0) | |
646 | newWeld(root, torso, 0, -1*size, 0) | |
647 | torso.Weld.C1 = CFrame.new(0, -1*size, 0) | |
648 | ||
649 | emitters={} | |
650 | for i,v in pairs(char:GetChildren()) do | |
651 | if v:IsA("Part") and v.Name ~= "HumanoidRootPart" then | |
652 | local emitter = Instance.new("ParticleEmitter",v) | |
653 | emitter.LightEmission = 1 | |
654 | emitter.Transparency = NumberSequence.new(0.95,1) | |
655 | emitter.Size = NumberSequence.new(2,5) | |
656 | emitter.SpreadAngle = Vector2.new(360,360) | |
657 | emitter.Speed = NumberRange.new(1) | |
658 | emitter.Lifetime = NumberRange.new(0.75) | |
659 | emitter.Texture = "rbxassetid://133619974" | |
660 | emitter.Rate = 20 | |
661 | emitter.Color = ColorSequence.new(Color3.new(1,0,0)) | |
662 | emitter.LockedToPart = true | |
663 | table.insert(emitters,emitter) | |
664 | end | |
665 | end | |
666 | ---------------------------------------------------------------------------- | |
667 | HitBox = Instance.new("Part",DebrisModel) | |
668 | HitBox.Size = Vector3.new(0.5,0.5,2.45) | |
669 | - | Part1.Color = Color3.new(0.972549, 0.972549, 0.972549) |
669 | + | |
670 | HitBox:BreakJoints() | |
671 | HitBox.Transparency = 1 | |
672 | newWeld(rarm,HitBox,0,-0.95,-1.9) | |
673 | atch0 = Instance.new("Attachment",HitBox) | |
674 | atch0.Position = Vector3.new(0,0,HitBox.Size.Z/2) | |
675 | atch1 = Instance.new("Attachment",HitBox) | |
676 | atch1.Position = Vector3.new(0,0,-HitBox.Size.Z/2) | |
677 | ||
678 | function ded(model) | |
679 | kills = kills + 1 | |
680 | model.Archivable = true | |
681 | - | Part3.Color = Color3.new(0.972549, 0.972549, 0.972549) |
681 | + | |
682 | local clone = model:Clone() | |
683 | clone.Parent = workspace | |
684 | clone.Name = "DED" | |
685 | model:Destroy() | |
686 | clone:FindFirstChildOfClass("Humanoid"):Destroy() | |
687 | local emitters={} | |
688 | for i,v in pairs(clone:GetChildren()) do | |
689 | if v:IsA("Accoutrement") then | |
690 | v:Destroy() | |
691 | end | |
692 | if v:IsA("Part") then | |
693 | - | Part5.Color = Color3.new(1, 0, 0) |
693 | + | |
694 | v.CanCollide = false | |
695 | v.Transparency = 1 | |
696 | local emitter = Instance.new("ParticleEmitter",v) | |
697 | emitter.LightEmission = 1 | |
698 | emitter.Transparency = NumberSequence.new(0,1) | |
699 | emitter.Size = NumberSequence.new(0,0.8) | |
700 | emitter.SpreadAngle = Vector2.new(360,360) | |
701 | emitter.Speed = NumberRange.new(0.5) | |
702 | - | Part6.Color = Color3.new(0.972549, 0.972549, 0.972549) |
702 | + | |
703 | emitter.Texture = "rbxassetid://744949545" | |
704 | emitter.Rate = 20 | |
705 | emitter.Color = ColorSequence.new(Color3.new(1,1,1)) | |
706 | emitter.LockedToPart = false | |
707 | table.insert(emitters,emitter) | |
708 | end | |
709 | end | |
710 | delay(1, function() | |
711 | sound(427025525,clone.Head.Position,10,1) | |
712 | for i,v in pairs(emitters) do | |
713 | v.Speed = NumberRange.new(4) | |
714 | v.Acceleration = Vector3.new(0,10,0) | |
715 | delay(0.5, function() | |
716 | v.Enabled = false | |
717 | debris:AddItem(clone,0.75) | |
718 | end) | |
719 | end | |
720 | end) | |
721 | end | |
722 | ||
723 | local alreadytouched = {} | |
724 | - | Part9.Color = Color3.new(0.105882, 0.164706, 0.207843) |
724 | + | |
725 | coroutine.resume(coroutine.create(function() | |
726 | local hit = ht.Parent | |
727 | if mode == "determination" and hit.Name ~= "DED" and attacking == true and checkIfNotPlayer(ht) and hit:FindFirstChildOfClass("Humanoid") and hit:FindFirstChildOfClass("Humanoid").Health > 0 then | |
728 | local hurt = true | |
729 | for i,v in pairs(alreadytouched) do if v == hit then hurt = false end end | |
730 | if hurt == true then | |
731 | table.insert(alreadytouched,hit) | |
732 | sound(388826051,ht.Position,10,1) | |
733 | ded(hit) | |
734 | - | Part10.Color = Color3.new(1, 0, 0) |
734 | + | |
735 | end | |
736 | end)) | |
737 | end) | |
738 | ||
739 | function createknife() | |
740 | Model0 = Instance.new("Model") | |
741 | Part1 = Instance.new("Part") | |
742 | BlockMesh2 = Instance.new("BlockMesh") | |
743 | Part3 = Instance.new("Part") | |
744 | BlockMesh4 = Instance.new("BlockMesh") | |
745 | - | Part12.Color = Color3.new(0.105882, 0.164706, 0.207843) |
745 | + | |
746 | Part6 = Instance.new("Part") | |
747 | BlockMesh7 = Instance.new("BlockMesh") | |
748 | - | if v:IsA("Part") and v.Color == Color3.new(1,0,0) then |
748 | + | |
749 | - | v.Material = Enum.Material.Neon |
749 | + | |
750 | Part10 = Instance.new("Part") | |
751 | SpecialMesh11 = Instance.new("SpecialMesh") | |
752 | Part12 = Instance.new("Part") | |
753 | Model0.Parent = char | |
754 | Part1.Parent = Model0 | |
755 | Part1.Anchored = true | |
756 | Part1.CanCollide = false | |
757 | Part1.Size = Vector3.new(0.280000031, 0.0500000007, 0.0500000007) | |
758 | Part1.CFrame = CFrame.new(49.5, 20.7350044, 52.3199997, 0.99999994, 0, 0, 0, 1, -5.56362707e-08, 0, 5.56362707e-08, 1) | |
759 | Part1.BottomSurface = Enum.SurfaceType.Smooth | |
760 | Part1.TopSurface = Enum.SurfaceType.Smooth | |
761 | Part1.Position = Vector3.new(49.5, 20.7350044, 52.3199997) | |
762 | Part1.Color = maincol | |
763 | BlockMesh2.Parent = Part1 | |
764 | BlockMesh2.Scale = Vector3.new(1, 0.399999797, 0.400000781) | |
765 | BlockMesh2.Scale = Vector3.new(1, 0.399999797, 0.400000781) | |
766 | Part3.Parent = Model0 | |
767 | Part3.Anchored = true | |
768 | Part3.CanCollide = false | |
769 | Part3.Size = Vector3.new(0.220000014, 0.0500000007, 0.0500000007) | |
770 | Part3.CFrame = CFrame.new(49.5, 20.6250038, 53.6199989, 0.99999994, 0, 0, 0, 1, -5.56362707e-08, 0, 5.56362707e-08, 1) | |
771 | Part3.BottomSurface = Enum.SurfaceType.Smooth | |
772 | Part3.TopSurface = Enum.SurfaceType.Smooth | |
773 | Part3.Position = Vector3.new(49.5, 20.6250038, 53.6199989) | |
774 | Part3.Color = maincol | |
775 | BlockMesh4.Parent = Part3 | |
776 | BlockMesh4.Scale = Vector3.new(1, 0.399999797, 0.400000781) | |
777 | BlockMesh4.Scale = Vector3.new(1, 0.399999797, 0.400000781) | |
778 | Part5.Parent = Model0 | |
779 | Part5.Anchored = true | |
780 | Part5.CanCollide = false | |
781 | Part5.Size = Vector3.new(0.159999996, 0.400000006, 1.70000005) | |
782 | Part5.CFrame = CFrame.new(49.5, 20.5750046, 51.4300003, 0.99999994, 0, 0, 0, 1, -5.56362707e-08, 0, 5.56362707e-08, 1) | |
783 | Part5.BottomSurface = Enum.SurfaceType.Smooth | |
784 | Part5.TopSurface = Enum.SurfaceType.Smooth | |
785 | Part5.Position = Vector3.new(49.5, 20.5750046, 51.4300003) | |
786 | Part5.Color = maincol2 | |
787 | Part6.Parent = Model0 | |
788 | Part6.Anchored = true | |
789 | Part6.CanCollide = false | |
790 | Part6.Size = Vector3.new(0.280000031, 0.0500000007, 0.0500000007) | |
791 | Part6.CFrame = CFrame.new(49.5, 20.4150047, 52.3199997, 0.99999994, 0, 0, 0, 1, -5.56362707e-08, 0, 5.56362707e-08, 1) | |
792 | Part6.BottomSurface = Enum.SurfaceType.Smooth | |
793 | Part6.TopSurface = Enum.SurfaceType.Smooth | |
794 | Part6.Position = Vector3.new(49.5, 20.4150047, 52.3199997) | |
795 | Part6.Color = maincol | |
796 | BlockMesh7.Parent = Part6 | |
797 | BlockMesh7.Scale = Vector3.new(1, 0.399999797, 0.400000781) | |
798 | BlockMesh7.Scale = Vector3.new(1, 0.399999797, 0.400000781) | |
799 | Part8.Name = "asd" | |
800 | Part8.Parent = Model0 | |
801 | Part8.Anchored = true | |
802 | Part8.CanCollide = false | |
803 | Part8.Size = Vector3.new(0.200000003, 0.200000003, 1.30000007) | |
804 | Part8.CFrame = CFrame.new(49.5, 20.6250038, 52.9300003, 0.99999994, 0, 0, 0, 1, -5.56362707e-08, 0, 5.56362707e-08, 1) | |
805 | Part8.BottomSurface = Enum.SurfaceType.Smooth | |
806 | Part8.TopSurface = Enum.SurfaceType.Smooth | |
807 | Part8.Position = Vector3.new(49.5, 20.6250038, 52.9300003) | |
808 | Part8.Color = maincol | |
809 | Part9.Parent = Model0 | |
810 | Part9.Anchored = true | |
811 | Part9.CanCollide = false | |
812 | Part9.Size = Vector3.new(0.200000003, 0.25999999, 0.100000039) | |
813 | Part9.CFrame = CFrame.new(49.5, 20.595005, 53.6199989, 0.99999994, 0, 0, 0, 1, -5.56362707e-08, 0, 5.56362707e-08, 1) | |
814 | Part9.BottomSurface = Enum.SurfaceType.Smooth | |
815 | Part9.TopSurface = Enum.SurfaceType.Smooth | |
816 | Part9.Position = Vector3.new(49.5, 20.595005, 53.6199989) | |
817 | Part9.Color = maincol | |
818 | Part10.Parent = Model0 | |
819 | Part10.Rotation = Vector3.new(0, 0, 180) | |
820 | Part10.Anchored = true | |
821 | Part10.CanCollide = false | |
822 | Part10.Size = Vector3.new(0.159999996, 0.400000006, 0.800000012) | |
823 | Part10.CFrame = CFrame.new(49.5, 20.5750046, 50.1800003, -0.99999994, -8.74227766e-08, 3.82137093e-15, 8.74227695e-08, -1, 3.17865059e-08, 1.04250613e-15, 3.17865059e-08, 1) | |
824 | Part10.BottomSurface = Enum.SurfaceType.Smooth | |
825 | Part10.TopSurface = Enum.SurfaceType.Smooth | |
826 | Part10.Position = Vector3.new(49.5, 20.5750046, 50.1800003) | |
827 | Part10.Color = maincol2 | |
828 | SpecialMesh11.Parent = Part10 | |
829 | SpecialMesh11.MeshType = Enum.MeshType.Wedge | |
830 | Part12.Parent = Model0 | |
831 | Part12.Anchored = true | |
832 | Part12.CanCollide = false | |
833 | Part12.Size = Vector3.new(0.25999999, 0.460000008, 0.100000039) | |
834 | Part12.CFrame = CFrame.new(49.5, 20.5750046, 52.3199997, 0.99999994, 0, 0, 0, 1, -5.56362707e-08, 0, 5.56362707e-08, 1) | |
835 | Part12.BottomSurface = Enum.SurfaceType.Smooth | |
836 | Part12.TopSurface = Enum.SurfaceType.Smooth | |
837 | Part12.Position = Vector3.new(49.5, 20.5750046, 52.3199997) | |
838 | Part12.Color = maincol | |
839 | weld(Model0) | |
840 | for i,v in pairs(Model0:GetChildren()) do | |
841 | if v:IsA("Part") and v.Color == maincol2 then | |
842 | v.Material = Enum.Material.Metal | |
843 | end | |
844 | end | |
845 | return Model0 | |
846 | end | |
847 | ||
848 | knife = createknife() | |
849 | newWeld(rarm,knife.asd,0,-1,0) | |
850 | ---------------------------------------------------------------------------------------- | |
851 | local TouchSensor = Instance.new("Part", char) | |
852 | TouchSensor.Size = Vector3.new(0.5,0.5,0.5) | |
853 | TouchSensor.Material = "Neon" | |
854 | TouchSensor.Transparency = 1 | |
855 | TouchSensor.CanCollide = false | |
856 | ||
857 | local TouchSensorWeld = Instance.new("Weld", TouchSensor) | |
858 | TouchSensorWeld.Part0 = char.HumanoidRootPart | |
859 | TouchSensorWeld.Part1 = TouchSensor | |
860 | TouchSensorWeld.C0 = CFrame.new(0,-4,0) | |
861 | ||
862 | local LastMaterial = "Grass" | |
863 | local LastColor = Color3.fromRGB(255, 255, 0) | |
864 | local LastTrans = 0 | |
865 | ||
866 | TouchSensor.Touched:Connect(function(hit) | |
867 | if hit.Parent:FindFirstChildOfClass("Humanoid") == nil and hit:IsA("Part") and hit.Parent ~= Effects and hit.Parent ~= BodyParts and hit.Parent ~= HealthBarParts then | |
868 | LastMaterial = hit.Material | |
869 | LastColor = hit.Color | |
870 | LastTrans = hit.Transparency | |
871 | end | |
872 | end) | |
873 | ||
874 | local HealthBase = Instance.new("Part", HealthBarParts) | |
875 | HealthBase.Material = "Neon" | |
876 | HealthBase.Color = Color3.fromRGB(255, 255, 0) | |
877 | HealthBase.Size = Vector3.new(10, 2, 2) | |
878 | HealthBase.CanCollide = false | |
879 | HealthBase.Anchored = true | |
880 | HealthBase.Name = "HealthMain" | |
881 | ||
882 | ||
883 | local Health = Instance.new("Part", HealthBarParts) | |
884 | Health.Material = "Neon" | |
885 | Health.Color = Color3.fromRGB(255, 255, 0) | |
886 | Health.Size = Vector3.new(10.1, 2.1, 2.1) | |
887 | Health.CanCollide = false | |
888 | Health.Anchored = true | |
889 | Health.Name = "Health" | |
890 | coroutine.resume(coroutine.create(function() | |
891 | while wait() do | |
892 | HealthBase.CFrame = HealthBase.CFrame:lerp(char.HumanoidRootPart.CFrame * CFrame.new(0, 9, 0), BlockSpeed) | |
893 | Health.CFrame = Health.CFrame:lerp(HealthBase.CFrame, BlockSpeed*5) | |
894 | Health.Size = Health.Size:lerp(Vector3.new(hum.Health/hum.MaxHealth*10.1, 2.1, 2.1), 0.1) | |
895 | end | |
896 | end)) | |
897 | ||
898 | ||
899 | -- REGEN | |
900 | coroutine.resume(coroutine.create(function() | |
901 | while hum.Health < hum.MaxHealth do | |
902 | hum.Health = hum.Health + 1 | |
903 | local r1 = math.random(-5, 5) | |
904 | local r2 = math.random(-5, 5) | |
905 | local r3 = math.random(-5, 5) | |
906 | local c = math.random(1, 5) | |
907 | local Parto = Instance.new("Part", Effects) | |
908 | Parto.Material = "Neon" | |
909 | Parto.Size = Vector3.new(0.2, 0.2, 0.2) | |
910 | Parto.Shape = "Ball" | |
911 | Parto.Anchored = true | |
912 | Parto.CanCollide = false | |
913 | ||
914 | if c == 1 then | |
915 | Parto.Color = Color3.fromRGB(94, 255, 229) | |
916 | elseif c == 2 then | |
917 | Parto.Color = Color3.fromRGB(48, 255, 62) | |
918 | elseif c == 3 then | |
919 | Parto.Color = Color3.fromRGB(81, 255, 0) | |
920 | elseif c == 4 then | |
921 | Parto.Color = Color3.fromRGB(44, 252, 255) | |
922 | elseif c == 5 then | |
923 | Parto.Color = Color3.fromRGB(58, 180, 255) | |
924 | end | |
925 | ||
926 | Parto.CFrame = tors.cf * Ccf(r1, r2, r3) | |
927 | coroutine.resume(coroutine.create(function() | |
928 | for i = 1, 50 do | |
929 | wait() | |
930 | Parto.CFrame = Parto.cf:lerp(Torso.CFrame, 0.1) | |
931 | Parto.Transparency = Parto.Transparency + 0.05 | |
932 | if Parto.Transparency >= 1 then | |
933 | Parto:Destroy() | |
934 | end | |
935 | end | |
936 | end)) | |
937 | wait() | |
938 | end | |
939 | end)) | |
940 | ---------------------------------------------------------------------------------------- | |
941 | ||
942 | function createpistol() | |
943 | Model0 = Instance.new("Model") | |
944 | Part1 = Instance.new("Part") | |
945 | BlockMesh2 = Instance.new("BlockMesh") | |
946 | Part3 = Instance.new("Part") | |
947 | Part4 = Instance.new("Part") | |
948 | Part5 = Instance.new("Part") | |
949 | Part6 = Instance.new("Part") | |
950 | Part7 = Instance.new("Part") | |
951 | Part8 = Instance.new("Part") | |
952 | Part9 = Instance.new("Part") | |
953 | Part10 = Instance.new("Part") | |
954 | Part11 = Instance.new("Part") | |
955 | Part12 = Instance.new("Part") | |
956 | Part13 = Instance.new("Part") | |
957 | Part14 = Instance.new("Part") | |
958 | Part15 = Instance.new("Part") | |
959 | Part16 = Instance.new("Part") | |
960 | Part17 = Instance.new("Part") | |
961 | Part18 = Instance.new("Part") | |
962 | Part19 = Instance.new("Part") | |
963 | Model0.Name = "Pistol" | |
964 | Model0.Parent = char | |
965 | Part1.Name = "ShootPos" | |
966 | Part1.Parent = Model0 | |
967 | Part1.BrickColor = BrickColor.new("Really black") | |
968 | Part1.Anchored = true | |
969 | Part1.CanCollide = false | |
970 | Part1.Size = Vector3.new(0.100000001, 0.100000001, 0.0500000007) | |
971 | Part1.CFrame = CFrame.new(-90, 10.5000019, 13.8957434, 1, 0, 0, 0, 1, -2.08616257e-07, 0, 2.08616257e-07, 1) | |
972 | Part1.BottomSurface = Enum.SurfaceType.Smooth | |
973 | Part1.TopSurface = Enum.SurfaceType.Smooth | |
974 | Part1.Color = Color3.new(0.0666667, 0.0666667, 0.0666667) | |
975 | Part1.Position = Vector3.new(-90, 10.5000019, 13.8957434) | |
976 | Part1.Color = Color3.new(0.0666667, 0.0666667, 0.0666667) | |
977 | BlockMesh2.Parent = Part1 | |
978 | BlockMesh2.Scale = Vector3.new(1, 1, 0.199999988) | |
979 | BlockMesh2.Scale = Vector3.new(1, 1, 0.199999988) | |
980 | Part3.Parent = Model0 | |
981 | Part3.BrickColor = BrickColor.new("Pearl") | |
982 | Part3.Anchored = true | |
983 | Part3.CanCollide = false | |
984 | Part3.Size = Vector3.new(0.100000001, 0.550000012, 0.0500000007) | |
985 | Part3.CFrame = CFrame.new(-90.0999985, 10.3750019, 13.8757429, 1, 0, 0, 0, 1, -2.08616257e-07, 0, 2.08616257e-07, 1) | |
986 | Part3.BottomSurface = Enum.SurfaceType.Smooth | |
987 | Part3.TopSurface = Enum.SurfaceType.Smooth | |
988 | Part3.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
989 | Part3.Position = Vector3.new(-90.0999985, 10.3750019, 13.8757429) | |
990 | Part3.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
991 | Part4.Parent = Model0 | |
992 | Part4.BrickColor = BrickColor.new("Pearl") | |
993 | Part4.Anchored = true | |
994 | Part4.CanCollide = false | |
995 | Part4.Size = Vector3.new(0.300000012, 0.349999994, 0.0500000007) | |
996 | Part4.CFrame = CFrame.new(-90, 10.2750025, 13.8757429, 1, 0, 0, 0, 1, -2.08616257e-07, 0, 2.08616257e-07, 1) | |
997 | Part4.BottomSurface = Enum.SurfaceType.Smooth | |
998 | Part4.TopSurface = Enum.SurfaceType.Smooth | |
999 | Part4.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1000 | Part4.Position = Vector3.new(-90, 10.2750025, 13.8757429) | |
1001 | - | v.Material = Enum.Material.Neon |
1001 | + | |
1002 | Part5.Parent = Model0 | |
1003 | Part5.BrickColor = BrickColor.new("Pearl") | |
1004 | Part5.Rotation = Vector3.new(15, 0, 0) | |
1005 | Part5.Anchored = true | |
1006 | Part5.CanCollide = false | |
1007 | Part5.Size = Vector3.new(0.200000003, 0.25, 0.150000006) | |
1008 | Part5.CFrame = CFrame.new(-90, 10.4379425, 15.8274469, 1, 0, 0, 0, 0.965925753, -0.258819252, 0, 0.258819252, 0.965925753) | |
1009 | Part5.BottomSurface = Enum.SurfaceType.Smooth | |
1010 | Part5.TopSurface = Enum.SurfaceType.Smooth | |
1011 | Part5.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1012 | Part5.Position = Vector3.new(-90, 10.4379425, 15.8274469) | |
1013 | Part5.Orientation = Vector3.new(15, 0, 0) | |
1014 | Part5.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1015 | Part6.Parent = Model0 | |
1016 | Part6.BrickColor = BrickColor.new("Pearl") | |
1017 | Part6.Anchored = true | |
1018 | Part6.CanCollide = false | |
1019 | Part6.Size = Vector3.new(0.300000012, 0.550000012, 1.89999998) | |
1020 | Part6.CFrame = CFrame.new(-90, 10.3750019, 14.8507433, 1, 0, 0, 0, 1, -2.08616257e-07, 0, 2.08616257e-07, 1) | |
1021 | Part6.BottomSurface = Enum.SurfaceType.Smooth | |
1022 | Part6.TopSurface = Enum.SurfaceType.Smooth | |
1023 | Part6.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1024 | Part6.Position = Vector3.new(-90, 10.3750019, 14.8507433) | |
1025 | Part6.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1026 | Part7.Parent = Model0 | |
1027 | Part7.BrickColor = BrickColor.new("Pearl") | |
1028 | Part7.Anchored = true | |
1029 | Part7.CanCollide = false | |
1030 | Part7.Size = Vector3.new(0.100000001, 0.0500000007, 0.0500000007) | |
1031 | Part7.CFrame = CFrame.new(-90.0999985, 10.6750021, 15.6257429, 1, 0, 0, 0, 1, -2.08616257e-07, 0, 2.08616257e-07, 1) | |
1032 | Part7.BottomSurface = Enum.SurfaceType.Smooth | |
1033 | Part7.TopSurface = Enum.SurfaceType.Smooth | |
1034 | Part7.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1035 | Part7.Position = Vector3.new(-90.0999985, 10.6750021, 15.6257429) | |
1036 | Part7.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1037 | Part8.Parent = Model0 | |
1038 | Part8.BrickColor = BrickColor.new("Black") | |
1039 | Part8.Rotation = Vector3.new(-15, 0, 0) | |
1040 | Part8.Anchored = true | |
1041 | Part8.CanCollide = false | |
1042 | Part8.Size = Vector3.new(0.220000014, 0.5, 0.209999993) | |
1043 | Part8.CFrame = CFrame.new(-90, 9.71499538, 15.4898481, 1, 0, 0, 0, 0.965925872, 0.258818835, 0, -0.258818835, 0.965925872) | |
1044 | Part8.BottomSurface = Enum.SurfaceType.Smooth | |
1045 | Part8.TopSurface = Enum.SurfaceType.Smooth | |
1046 | Part8.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
1047 | Part8.Position = Vector3.new(-90, 9.71499538, 15.4898481) | |
1048 | Part8.Orientation = Vector3.new(-15, 0, 0) | |
1049 | Part8.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
1050 | Part9.Parent = Model0 | |
1051 | Part9.BrickColor = BrickColor.new("Pearl") | |
1052 | Part9.Anchored = true | |
1053 | Part9.CanCollide = false | |
1054 | Part9.Size = Vector3.new(0.100000001, 0.550000012, 0.0500000007) | |
1055 | Part9.CFrame = CFrame.new(-89.9000015, 10.3750019, 13.8757429, 1, 0, 0, 0, 1, -2.08616257e-07, 0, 2.08616257e-07, 1) | |
1056 | Part9.BottomSurface = Enum.SurfaceType.Smooth | |
1057 | Part9.TopSurface = Enum.SurfaceType.Smooth | |
1058 | Part9.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1059 | Part9.Position = Vector3.new(-89.9000015, 10.3750019, 13.8757429) | |
1060 | Part9.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1061 | Part10.Parent = Model0 | |
1062 | Part10.BrickColor = BrickColor.new("Pearl") | |
1063 | Part10.Anchored = true | |
1064 | Part10.CanCollide = false | |
1065 | Part10.Size = Vector3.new(0.100000001, 0.0500000007, 0.0500000007) | |
1066 | Part10.CFrame = CFrame.new(-89.9000015, 10.6750021, 15.6257429, 1, 0, 0, 0, 1, -2.08616257e-07, 0, 2.08616257e-07, 1) | |
1067 | Part10.BottomSurface = Enum.SurfaceType.Smooth | |
1068 | Part10.TopSurface = Enum.SurfaceType.Smooth | |
1069 | Part10.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1070 | Part10.Position = Vector3.new(-89.9000015, 10.6750021, 15.6257429) | |
1071 | Part10.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1072 | Part11.Parent = Model0 | |
1073 | Part11.BrickColor = BrickColor.new("Pearl") | |
1074 | Part11.Anchored = true | |
1075 | Part11.CanCollide = false | |
1076 | Part11.Size = Vector3.new(0.200000003, 0.150000006, 0.600000024) | |
1077 | Part11.CFrame = CFrame.new(-90, 9.37500191, 15.6007433, 1, 0, 0, 0, 1, -2.08616257e-07, 0, 2.08616257e-07, 1) | |
1078 | Part11.BottomSurface = Enum.SurfaceType.Smooth | |
1079 | Part11.TopSurface = Enum.SurfaceType.Smooth | |
1080 | Part11.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1081 | Part11.Position = Vector3.new(-90, 9.37500191, 15.6007433) | |
1082 | Part11.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1083 | Part12.Parent = Model0 | |
1084 | Part12.BrickColor = BrickColor.new("Pearl") | |
1085 | Part12.Rotation = Vector3.new(-30, 0, 0) | |
1086 | Part12.Anchored = true | |
1087 | Part12.CanCollide = false | |
1088 | Part12.Size = Vector3.new(0.100000001, 0.150000006, 0.0500000007) | |
1089 | Part12.CFrame = CFrame.new(-90, 9.97165203, 15.1132431, 1, 0, 0, 0, 0.866025448, 0.5, 0, -0.5, 0.866025448) | |
1090 | Part12.BottomSurface = Enum.SurfaceType.Smooth | |
1091 | Part12.TopSurface = Enum.SurfaceType.Smooth | |
1092 | Part12.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1093 | Part12.Position = Vector3.new(-90, 9.97165203, 15.1132431) | |
1094 | Part12.Orientation = Vector3.new(-30, 0, 0) | |
1095 | Part12.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1096 | Part13.Parent = Model0 | |
1097 | Part13.BrickColor = BrickColor.new("Pearl") | |
1098 | Part13.Anchored = true | |
1099 | Part13.CanCollide = false | |
1100 | Part13.Size = Vector3.new(0.300000012, 0.100000001, 0.0500000007) | |
1101 | Part13.CFrame = CFrame.new(-90, 10.6000023, 13.8757429, 1, 0, 0, 0, 1, -2.08616257e-07, 0, 2.08616257e-07, 1) | |
1102 | Part13.BottomSurface = Enum.SurfaceType.Smooth | |
1103 | Part13.TopSurface = Enum.SurfaceType.Smooth | |
1104 | Part13.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1105 | Part13.Position = Vector3.new(-90, 10.6000023, 13.8757429) | |
1106 | Part13.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1107 | Part14.Parent = Model0 | |
1108 | Part14.BrickColor = BrickColor.new("Pearl") | |
1109 | Part14.Rotation = Vector3.new(-30, 0, 0) | |
1110 | Part14.Anchored = true | |
1111 | Part14.CanCollide = false | |
1112 | Part14.Size = Vector3.new(0.200000003, 0.100000001, 0.25) | |
1113 | Part14.CFrame = CFrame.new(-90, 10.5216522, 15.9065447, 1, 0, 0, 0, 0.866025329, 0.49999997, 0, -0.49999997, 0.866025329) | |
1114 | Part14.BottomSurface = Enum.SurfaceType.Smooth | |
1115 | Part14.TopSurface = Enum.SurfaceType.Smooth | |
1116 | Part14.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1117 | Part14.Position = Vector3.new(-90, 10.5216522, 15.9065447) | |
1118 | Part14.Orientation = Vector3.new(-30, 0, 0) | |
1119 | Part14.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1120 | Part15.Parent = Model0 | |
1121 | Part15.BrickColor = BrickColor.new("White") | |
1122 | Part15.Rotation = Vector3.new(-105, 0, 0) | |
1123 | Part15.Anchored = true | |
1124 | Part15.CanCollide = false | |
1125 | Part15.Size = Vector3.new(0.100000001, 0.200000003, 0.0500000007) | |
1126 | Part15.CFrame = CFrame.new(-90, 9.92812252, 15.2373915, 1, 0, 0, 0, -0.258819371, 0.965925813, 0, -0.965925813, -0.258819371) | |
1127 | Part15.BottomSurface = Enum.SurfaceType.Smooth | |
1128 | Part15.TopSurface = Enum.SurfaceType.Smooth | |
1129 | - | Part0.Material = Enum.Material.Neon |
1129 | + | |
1130 | Part15.Position = Vector3.new(-90, 9.92812252, 15.2373915) | |
1131 | Part15.Orientation = Vector3.new(-75, 180, 180) | |
1132 | Part15.Color = Color3.new(0.94902, 0.952941, 0.952941) | |
1133 | Part16.Name = "asd" | |
1134 | Part16.Parent = Model0 | |
1135 | Part16.BrickColor = BrickColor.new("Pearl") | |
1136 | Part16.Rotation = Vector3.new(-15, 0, 0) | |
1137 | Part16.Anchored = true | |
1138 | Part16.CanCollide = false | |
1139 | Part16.Size = Vector3.new(0.200000003, 1.14999998, 0.400000006) | |
1140 | Part16.CFrame = CFrame.new(-90, 9.93709087, 15.5425692, 1, 0, 0, 0, 0.965925872, 0.258818835, 0, -0.258818835, 0.965925872) | |
1141 | Part16.BottomSurface = Enum.SurfaceType.Smooth | |
1142 | Part16.TopSurface = Enum.SurfaceType.Smooth | |
1143 | Part16.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1144 | Part16.Position = Vector3.new(-90, 9.93709087, 15.5425692) | |
1145 | Part16.Orientation = Vector3.new(-15, 0, 0) | |
1146 | Part16.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1147 | Part17.Parent = Model0 | |
1148 | Part17.BrickColor = BrickColor.new("Pearl") | |
1149 | Part17.Anchored = true | |
1150 | Part17.CanCollide = false | |
1151 | Part17.Size = Vector3.new(0.100000001, 0.100000001, 0.0500000007) | |
1152 | Part17.CFrame = CFrame.new(-90, 10.0500021, 15.0757437, 1, 0, 0, 0, 1, -2.08616257e-07, 0, 2.08616257e-07, 1) | |
1153 | Part17.BottomSurface = Enum.SurfaceType.Smooth | |
1154 | Part17.TopSurface = Enum.SurfaceType.Smooth | |
1155 | Part17.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1156 | Part17.Position = Vector3.new(-90, 10.0500021, 15.0757437) | |
1157 | Part17.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1158 | Part18.Parent = Model0 | |
1159 | Part18.BrickColor = BrickColor.new("Pearl") | |
1160 | Part18.Anchored = true | |
1161 | Part18.CanCollide = false | |
1162 | Part18.Size = Vector3.new(0.100000001, 0.0500000007, 0.0500000007) | |
1163 | Part18.CFrame = CFrame.new(-90, 10.6750021, 13.8757429, 1, 0, 0, 0, 1, -2.08616257e-07, 0, 2.08616257e-07, 1) | |
1164 | Part18.BottomSurface = Enum.SurfaceType.Smooth | |
1165 | Part18.TopSurface = Enum.SurfaceType.Smooth | |
1166 | Part18.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1167 | Part18.Position = Vector3.new(-90, 10.6750021, 13.8757429) | |
1168 | Part18.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1169 | Part19.Parent = Model0 | |
1170 | Part19.BrickColor = BrickColor.new("Pearl") | |
1171 | Part19.Anchored = true | |
1172 | Part19.CanCollide = false | |
1173 | Part19.Size = Vector3.new(0.400000006, 0.200000003, 1.05000007) | |
1174 | Part19.CFrame = CFrame.new(-90, 10.1500015, 14.4757433, 1, 0, 0, 0, 1, -2.08616257e-07, 0, 2.08616257e-07, 1) | |
1175 | Part19.BottomSurface = Enum.SurfaceType.Smooth | |
1176 | Part19.TopSurface = Enum.SurfaceType.Smooth | |
1177 | Part19.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1178 | Part19.Position = Vector3.new(-90, 10.1500015, 14.4757433) | |
1179 | Part19.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1180 | for i,v in pairs(Model0:GetChildren()) do | |
1181 | if v:IsA("Part") then | |
1182 | v.Color = Color3.new(1,1,0) | |
1183 | v.Material = Enum.Material.Metal | |
1184 | v.Transparency = 0 | |
1185 | v.CanCollide = false | |
1186 | end | |
1187 | end | |
1188 | weld(Model0) | |
1189 | return Model0 | |
1190 | end | |
1191 | ||
1192 | mode = "determination" | |
1193 | function justice() | |
1194 | mode = "justice" | |
1195 | for i=1,5 do rs:wait() | |
1196 | local asd = Vector3.new(math.random(-10000,10000)/10000,math.random(-10000,10000)/10000,math.random(-10000,10000)/10000) | |
1197 | Effect(Enum.MeshType.Brick,Vector3.new(1,1,1),0,Enum.Material.Neon,Color3.new(1,1,0),rarm.RightGripAttachment.WorldPosition+(asd*1),asd*360,Vector3.new(0.5,0.5,0.5),asd*1,0.1,0.0005) | |
1198 | end | |
1199 | knife:Destroy() | |
1200 | pistol = createpistol() | |
1201 | newWeld(rarm,pistol.asd,0,-1,0) | |
1202 | pistol.asd.Weld.C1 = CFrame.Angles(math.rad(110),0,0) | |
1203 | end | |
1204 | ||
1205 | function determination() | |
1206 | mode = "determination" | |
1207 | for i=1,5 do rs:wait() | |
1208 | local asd = Vector3.new(math.random(-10000,10000)/10000,math.random(-10000,10000)/10000,math.random(-10000,10000)/10000) | |
1209 | Effect(Enum.MeshType.Brick,Vector3.new(1,1,1),0,Enum.Material.Neon,Color3.new(1,0,0),rarm.RightGripAttachment.WorldPosition+(asd*1),asd*360,Vector3.new(0.5,0.5,0.5),asd*1,0.1,0.0005) | |
1210 | end | |
1211 | pistol:Destroy() | |
1212 | knife = createknife() | |
1213 | newWeld(rarm,knife.asd,0,-1,0) | |
1214 | end | |
1215 | debounce = false | |
1216 | ||
1217 | function dark() | |
1218 | local pos = root.Position | |
1219 | root.CFrame = CFrame.new(mouse.Hit.p+Vector3.new(0,3,0),pos) | |
1220 | end | |
1221 | function death() | |
1222 | warn("This move not done") | |
1223 | local gparts = {} | |
1224 | for i = 1, 9 do | |
1225 | local gpart = newPart(Effects, BrickColor.new("Really red"), 0, true, false, Vector3.new(), "Violet", "Neon") | |
1226 | local gmesh = mesh("BlockMesh", gpart, nil, nil, Vector3.new(0, 0, 0), Vector3.new(50, 10, 50)) | |
1227 | gpart.CFrame = root.CFrame * CFrame.new(math.random(-20, 20), -3, -15 + math.random(-20, 20)) | |
1228 | table.insert(gparts, gpart) | |
1229 | for i = 1, #gparts do | |
1230 | local gpart = gparts[i] | |
1231 | table.insert(partEffects, { | |
1232 | gpart, | |
1233 | "Block2", | |
1234 | 0.05, | |
1235 | -1, | |
1236 | 50, | |
1237 | -1, | |
1238 | gpart.Mesh | |
1239 | }) | |
1240 | for i, v in pairs(findCloseHumanoid(gpart.Position, 10)) do | |
1241 | local bv = Instance.new("BodyVelocity", v.Parent.Torso) | |
1242 | game.Debris:AddItem(bv, 1) | |
1243 | bv.Velocity = Vector3.new(0, 40, 0) | |
1244 | bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge) | |
1245 | end | |
1246 | end | |
1247 | end | |
1248 | end | |
1249 | mouse.KeyDown:connect(function(key) | |
1250 | if key == "z" then | |
1251 | dark() | |
1252 | end | |
1253 | if key == "x" then | |
1254 | death() | |
1255 | end | |
1256 | if debounce == false then | |
1257 | debounce = true | |
1258 | if key == "e" then | |
1259 | sound(462606062,root.Position,10,1) | |
1260 | if mode == "determination" then | |
1261 | justice() | |
1262 | elseif mode == "justice" then | |
1263 | determination() | |
1264 | end | |
1265 | end | |
1266 | delay(0.3,function() debounce = false end) | |
1267 | end | |
1268 | end) | |
1269 | ||
1270 | ---------------------------------------------------------------------------------------- | |
1271 | ||
1272 | function slash() | |
1273 | local spd = 0.2 | |
1274 | for i=1,15 do rs:wait() | |
1275 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,-.1) *CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), spd) | |
1276 | hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.new(0,0,0) *CFrame.Angles(math.rad(0),math.rad(-30),math.rad(0)), spd) | |
1277 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55,0) *CFrame.Angles(math.rad(0),math.rad(0),math.rad(-10)), spd) | |
1278 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55,0) *CFrame.Angles(math.rad(160),math.rad(0),math.rad(10)), spd) | |
1279 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0) *CFrame.Angles(math.rad(0),math.rad(-50),math.rad(10)), spd) | |
1280 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,-0.95,0)*CFrame.Angles(math.rad(0),math.rad(50),math.rad(-10)), spd) | |
1281 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,-0.95,0) *CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), spd) | |
1282 | end | |
1283 | sound(357417055,root.Position,10,1) | |
1284 | attacking = true | |
1285 | local spd = 0.4 | |
1286 | for i=1,5 do rs:wait() | |
1287 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,-.1) *CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), spd) | |
1288 | hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.new(0,0,0) *CFrame.Angles(math.rad(0),math.rad(80),math.rad(0)), spd) | |
1289 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55,0) *CFrame.Angles(math.rad(-10),math.rad(0),math.rad(-20)), spd) | |
1290 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55,0) *CFrame.Angles(math.rad(-10),math.rad(0),math.rad(0)), spd) | |
1291 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0) *CFrame.Angles(math.rad(0),math.rad(80),math.rad(-20)), spd) | |
1292 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,-0.95,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), spd) | |
1293 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,-0.95,0) *CFrame.Angles(math.rad(0),math.rad(-80),math.rad(20)), spd) | |
1294 | end | |
1295 | end | |
1296 | ||
1297 | mouse.Button1Down:connect(function() | |
1298 | if debounce == false and mode == "determination" then | |
1299 | alreadytouched = {} | |
1300 | noidle = true | |
1301 | debounce = true | |
1302 | slash() | |
1303 | attacking = false | |
1304 | noidle = false | |
1305 | delay(0.05,function() debounce = false end) | |
1306 | end | |
1307 | end) | |
1308 | ||
1309 | ----------------------------- | |
1310 | local jumped = false | |
1311 | function boom() | |
1312 | freeze = true | |
1313 | sound(446961725,root.Position,10,1) | |
1314 | local bg = Instance.new("BodyGyro",root) | |
1315 | bg.Name = "lolnochara" | |
1316 | bg.P = 10000 | |
1317 | bg.D = 100 | |
1318 | bg.MaxTorque = Vector3.new(9e9,9e9,9e9) | |
1319 | if jumped == false then | |
1320 | root.CFrame = CFrame.new(root.Position,Vector3.new(mouse.Hit.x,root.Position.Y,mouse.Hit.z)) | |
1321 | bg.CFrame = CFrame.new(root.Position,Vector3.new(mouse.Hit.x,root.Position.Y,mouse.Hit.z)) | |
1322 | else | |
1323 | root.CFrame = CFrame.new(root.Position,mouse.Hit.p) | |
1324 | bg.CFrame = CFrame.new(root.Position,mouse.Hit.p) | |
1325 | end | |
1326 | ||
1327 | local spd = 0.2 | |
1328 | - | trail.Enabled = true |
1328 | + | |
1329 | if jumped == false then | |
1330 | - | trail.Enabled = false |
1330 | + | |
1331 | else | |
1332 | bg.CFrame = CFrame.new(root.Position,mouse.Hit.p) | |
1333 | end | |
1334 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,-.1) *CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), spd) | |
1335 | hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.new(0,0,0) *CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)), spd) | |
1336 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55,0) *CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), spd) | |
1337 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55,0) *CFrame.Angles(math.rad(45),math.rad(0),math.rad(90)), spd) | |
1338 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0) *CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)), spd) | |
1339 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,-0.95,0)*CFrame.Angles(math.rad(0),math.rad(-5),math.rad(0)), spd) | |
1340 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,-0.95,0) *CFrame.Angles(math.rad(0),math.rad(-20),math.rad(0)), spd) | |
1341 | end | |
1342 | ||
1343 | bg:Destroy() | |
1344 | ||
1345 | sound(470245800,root.Position,10,1) | |
1346 | ||
1347 | local Part0 = Instance.new("Part",DebrisModel) | |
1348 | Part0.Name = "Bullet" | |
1349 | Part0.Material = Enum.Material.Metal | |
1350 | Part0.Color = Color3.new(1,1,0) | |
1351 | Part0.Anchored = true | |
1352 | local mesh = Instance.new("SpecialMesh",Part0) | |
1353 | mesh.MeshType = Enum.MeshType.Brick | |
1354 | Part0.CanCollide = false | |
1355 | local Position = rarm.Position | |
1356 | local Target = mouse.Hit.p | |
1357 | local direction = Target - Position | |
1358 | local direction = computeDirection(direction) | |
1359 | local ray = Ray.new(Position, (Target-Position).unit*1048) | |
1360 | local part, endPoint = workspace:FindPartOnRay(ray, char) | |
1361 | Part0.Size = Vector3.new(5,1,5) | |
1362 | mesh.Scale = Vector3.new(1,(Position-endPoint).magnitude+5,1) | |
1363 | local pos = Position + (direction * (mesh.Scale.Y/2)) | |
1364 | Part0.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0) | |
1365 | local loop = nil | |
1366 | local i = 0 | |
1367 | rs:connect(function() | |
1368 | local lole = (i/10) | |
1369 | mesh.Scale = Vector3.new(lole,mesh.Scale.Y,lole) | |
1370 | Part0.Transparency = Part0.Transparency + 0.1 | |
1371 | i = i + 1 | |
1372 | if Part0.Transparency >= 1 then | |
1373 | Part0:Destroy() | |
1374 | end | |
1375 | end) | |
1376 | ||
1377 | if part and part.Parent:FindFirstChildOfClass("Humanoid") and checkIfNotPlayer(part) == true then | |
1378 | coroutine.resume(coroutine.create(function() | |
1379 | sound(388826051,part.Position,10,1) | |
1380 | ded(part.Parent) | |
1381 | end)) | |
1382 | end | |
1383 | ||
1384 | local spd = 0.5 | |
1385 | for i=1,10 do rs:wait() | |
1386 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,-.1) *CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), spd) | |
1387 | hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.new(0,0,0) *CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)), spd) | |
1388 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55,0) *CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), spd) | |
1389 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55,0) *CFrame.Angles(math.rad(45),math.rad(40),math.rad(90)), spd) | |
1390 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0) *CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)), spd) | |
1391 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,-0.95,0)*CFrame.Angles(math.rad(0),math.rad(-5),math.rad(0)), spd) | |
1392 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,-0.95,0) *CFrame.Angles(math.rad(0),math.rad(-20),math.rad(0)), spd) | |
1393 | end | |
1394 | ||
1395 | freeze = false | |
1396 | ||
1397 | end | |
1398 | ||
1399 | mouse.Button1Down:connect(function() | |
1400 | if debounce == false and mode == "justice" then | |
1401 | alreadytouched = {} | |
1402 | noidle = true | |
1403 | debounce = true | |
1404 | boom() | |
1405 | attacking = false | |
1406 | noidle = false | |
1407 | delay(0.05,function() debounce = false end) | |
1408 | end | |
1409 | end) | |
1410 | ||
1411 | ---------------------------------------------------------------------------------------- | |
1412 | velocityYFall=0 | |
1413 | velocityYFall2=0 | |
1414 | velocityYFall3=0 | |
1415 | velocityYFall4=0 | |
1416 | neckrotY=0 | |
1417 | neckrotY2=0 | |
1418 | torsorotY=0 | |
1419 | torsorotY2=0 | |
1420 | torsoY=0 | |
1421 | torsoY2=0 | |
1422 | colored = 0 | |
1423 | sine = 0 | |
1424 | change=0.4 | |
1425 | movement=5 | |
1426 | timeranim=0 | |
1427 | running = false | |
1428 | glitched = false | |
1429 | backup = hed.Weld.C1 | |
1430 | glitchedC1 = hed.Weld.C1 | |
1431 | ||
1432 | mouse.KeyDown:connect(function(key) | |
1433 | key = string.lower(key) | |
1434 | if string.byte(key) == 48 then | |
1435 | running = true | |
1436 | local keyup = mouse.KeyUp:connect(function(key) | |
1437 | if string.byte(key) == 48 then | |
1438 | running = false | |
1439 | end | |
1440 | end) | |
1441 | repeat rs:wait() until running == false | |
1442 | keyup:disconnect() | |
1443 | end | |
1444 | end) | |
1445 | ||
1446 | icolor=1 | |
1447 | imode=false | |
1448 | ||
1449 | didjump = false | |
1450 | jumppower = 0 | |
1451 | freeze = false | |
1452 | debounceimpact = false | |
1453 | ||
1454 | function jumpimpact() | |
1455 | if debounceimpact == false then | |
1456 | debounceimpact = true | |
1457 | if jumppower < -150 then jumppower = -150 end | |
1458 | shake(-jumppower/5) | |
1459 | for i=1,-jumppower/20 do rs:wait() | |
1460 | hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0,0,0), 0.05) | |
1461 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, (jumppower/20)*size-hum.HipHeight, 0) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.05) | |
1462 | end | |
1463 | debounceimpact = false | |
1464 | end | |
1465 | end | |
1466 | ||
1467 | local sond = nil | |
1468 | rs:connect(function() | |
1469 | ||
1470 | if not torso:FindFirstChild("STATICSOUND") then | |
1471 | sond=Instance.new("Sound",torso) | |
1472 | sond.Name = "STATICSOUND" | |
1473 | sond.SoundId = "rbxassetid://223103466" | |
1474 | sond.Looped = true | |
1475 | sond:Play() | |
1476 | end | |
1477 | ||
1478 | if icolor > 1 then | |
1479 | imode = false | |
1480 | elseif icolor < 0 then | |
1481 | imode = true | |
1482 | end | |
1483 | ||
1484 | if imode == true then | |
1485 | icolor = icolor + 0.01 | |
1486 | else | |
1487 | icolor = icolor - 0.01 | |
1488 | end | |
1489 | ||
1490 | for i,v in pairs(emitters) do | |
1491 | v.Acceleration = root.CFrame.upVector*(666/100) | |
1492 | end | |
1493 | ||
1494 | if p.Character.Parent == nil then | |
1495 | local model = Instance.new("Model") | |
1496 | model.Name = p.Name | |
1497 | p.Character = model | |
1498 | for i,v in pairs(char:GetChildren()) do | |
1499 | v.Parent = p.Character | |
1500 | end | |
1501 | end | |
1502 | ||
1503 | char = p.Character | |
1504 | if p.Character.Parent ~= workspace then | |
1505 | p.Character.Parent = workspace | |
1506 | end | |
1507 | for i,v in pairs(char:GetChildren()) do | |
1508 | if v:IsA("Accoutrement") then | |
1509 | - | hed.face.Texture = "rbxassetid://435233416" |
1509 | + | |
1510 | v.Handle:FindFirstChild("Mesh").Offset = Vector3.new() | |
1511 | v.Handle.Transparency = 0 | |
1512 | end | |
1513 | elseif v:IsA("BasePart") then | |
1514 | v.Anchored = false | |
1515 | if v:FindFirstChildOfClass("BodyPosition") then | |
1516 | v:FindFirstChildOfClass("BodyPosition"):Destroy() | |
1517 | end | |
1518 | if v:FindFirstChildOfClass("BodyVelocity") then | |
1519 | v:FindFirstChildOfClass("BodyVelocity"):Destroy() | |
1520 | end | |
1521 | if v:FindFirstChildOfClass("BodyGyro") and v:FindFirstChildOfClass("BodyGyro").Name ~= "lolnochara" then | |
1522 | v:FindFirstChildOfClass("BodyGyro"):Destroy() | |
1523 | end | |
1524 | if not DebrisModel:FindFirstChild(v.Name.."FORCEFIELD") then | |
1525 | local force = Instance.new("Part",DebrisModel) | |
1526 | force.Name = v.Name.."FORCEFIELD" | |
1527 | force.Size = v.Size+(Vector3.new(1,1,1)*0.2) | |
1528 | - | hed.face.Texture = "rbxassetid://422627909" |
1528 | + | |
1529 | force.Transparency = 1 | |
1530 | newWeld(v,force,0,0,0) | |
1531 | else | |
1532 | if not DebrisModel:FindFirstChild(v.Name.."FORCEFIELD"):FindFirstChildOfClass("Weld") then | |
1533 | newWeld(v,DebrisModel:FindFirstChild(v.Name.."FORCEFIELD"),0,0,0) | |
1534 | end | |
1535 | end | |
1536 | - | end) |
1536 | + | |
1537 | v:FindFirstChild("Mesh").Offset = Vector3.new() | |
1538 | end | |
1539 | if v.Name ~= "HumanoidRootPart" then | |
1540 | v.Transparency = 0 | |
1541 | else | |
1542 | v.Transparency = 1 | |
1543 | end | |
1544 | end | |
1545 | end | |
1546 | ||
1547 | if freeze == false then | |
1548 | if running == false then | |
1549 | hum.WalkSpeed = 12*size | |
1550 | change=0.4 | |
1551 | movement=5 | |
1552 | else | |
1553 | hum.WalkSpeed = (666/10)*size | |
1554 | if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude >= 5*size then | |
1555 | change=1 | |
1556 | else | |
1557 | change=0.4 | |
1558 | end | |
1559 | movement=15 | |
1560 | end | |
1561 | else | |
1562 | hum.WalkSpeed = 1 | |
1563 | change=0.4 | |
1564 | movement=5 | |
1565 | end | |
1566 | ||
1567 | if -root.Velocity.Y/1.5 > -5 and -root.Velocity.Y/1.5 < 150 then | |
1568 | velocityYFall = root.Velocity.Y/1.5 | |
1569 | else | |
1570 | if -root.Velocity.Y/1.5 < -5 then | |
1571 | velocityYFall = 5 | |
1572 | elseif -root.Velocity.Y/1.5 > 150 then | |
1573 | velocityYFall = -150 | |
1574 | end | |
1575 | end | |
1576 | ||
1577 | if -root.Velocity.Y/180 > 0 and -root.Velocity.Y/180 < 1.2 then | |
1578 | velocityYFall2 = root.Velocity.Y/180 | |
1579 | else | |
1580 | if -root.Velocity.Y/180 < 0 then | |
1581 | velocityYFall2 = 0 | |
1582 | elseif -root.Velocity.Y/180 > 1.2 then | |
1583 | velocityYFall2 = -1.2 | |
1584 | end | |
1585 | end | |
1586 | ||
1587 | if -root.Velocity.Y/1.5 > -5 and -root.Velocity.Y/1.5 < 50 then | |
1588 | velocityYFall3 = root.Velocity.Y/1.5 | |
1589 | else | |
1590 | if -root.Velocity.Y/1.5 < -5 then | |
1591 | velocityYFall3 = 5 | |
1592 | elseif -root.Velocity.Y/1.5 > 50 then | |
1593 | velocityYFall3 = -50 | |
1594 | end | |
1595 | end | |
1596 | ||
1597 | if -root.Velocity.Y/1.5 > -50 and -root.Velocity.Y/1.5 < 20 then | |
1598 | velocityYFall4 = root.Velocity.Y/1.5 | |
1599 | else | |
1600 | if -root.Velocity.Y/180 < -5 then | |
1601 | velocityYFall4 = 5 | |
1602 | elseif -root.Velocity.Y/180 > 50 then | |
1603 | velocityYFall4 = -50 | |
1604 | end | |
1605 | end | |
1606 | ||
1607 | if root.RotVelocity.Y/6 < 1 and root.RotVelocity.Y/6 > -1 then | |
1608 | neckrotY = root.RotVelocity.Y/6 | |
1609 | else | |
1610 | if root.RotVelocity.Y/6 < -1 then | |
1611 | neckrotY = -1 | |
1612 | elseif root.RotVelocity.Y/6 > 1 then | |
1613 | neckrotY = 1 | |
1614 | end | |
1615 | end | |
1616 | ||
1617 | if root.RotVelocity.Y/8 < 0.6 and root.RotVelocity.Y/8 > -0.6 then | |
1618 | neckrotY2 = root.RotVelocity.Y/8 | |
1619 | else | |
1620 | if root.RotVelocity.Y/8 < -0.6 then | |
1621 | neckrotY2 = -0.6 | |
1622 | elseif root.RotVelocity.Y/8 > 0.6 then | |
1623 | neckrotY2 = 0.6 | |
1624 | end | |
1625 | end | |
1626 | ||
1627 | if root.RotVelocity.Y/6 < 0.2 and root.RotVelocity.Y/6 > -0.2 then | |
1628 | torsorotY = root.RotVelocity.Y/6 | |
1629 | else | |
1630 | if root.RotVelocity.Y/6 < -0.2 then | |
1631 | torsorotY = -0.2 | |
1632 | elseif root.RotVelocity.Y/6 > 0.2 then | |
1633 | torsorotY = 0.2 | |
1634 | end | |
1635 | end | |
1636 | ||
1637 | if root.RotVelocity.Y/8 < 0.2 and root.RotVelocity.Y/8 > -0.2 then | |
1638 | torsorotY2 = root.RotVelocity.Y/8 | |
1639 | else | |
1640 | if root.RotVelocity.Y/8 < -0.2 then | |
1641 | torsorotY2 = -0.2 | |
1642 | elseif root.RotVelocity.Y/8 > 0.2 then | |
1643 | torsorotY2 = 0.2 | |
1644 | end | |
1645 | end | |
1646 | ||
1647 | torsoY = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/20 | |
1648 | torsoY2 = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/36 | |
1649 | ||
1650 | local ray1 = Ray.new(root.Position+Vector3.new(size,0,0),Vector3.new(0, -4*size, 0)) | |
1651 | local part1, endPoint = workspace:FindPartOnRay(ray1, char) | |
1652 | local ray2 = Ray.new(root.Position-Vector3.new(size,0,0),Vector3.new(0, -4*size, 0)) | |
1653 | local part2, endPoint = workspace:FindPartOnRay(ray2, char) | |
1654 | local ray3 = Ray.new(root.Position+Vector3.new(0,0,size/2),Vector3.new(0, -4*size, 0)) | |
1655 | local part3, endPoint = workspace:FindPartOnRay(ray3, char) | |
1656 | local ray4 = Ray.new(root.Position-Vector3.new(0,0,size/2),Vector3.new(0, -4*size, 0)) | |
1657 | local part4, endPoint = workspace:FindPartOnRay(ray4, char) | |
1658 | local ray = Ray.new(root.Position,Vector3.new(0, -6, 0)) | |
1659 | local part, endPoint = workspace:FindPartOnRay(ray, char) | |
1660 | ||
1661 | if part1 or part2 or part3 or part4 then jumped = false else endPoint = 0 jumped = true end | |
1662 | ||
1663 | local rlegray = Ray.new(rleg.Position+Vector3.new(0,size/2,0),Vector3.new(0, -1.75*size, 0)) | |
1664 | local rlegpart, rlegendPoint = workspace:FindPartOnRay(rlegray, char) | |
1665 | ||
1666 | local llegray = Ray.new(lleg.Position+Vector3.new(0,size/2,0),Vector3.new(0, -1.75*size, 0)) | |
1667 | local llegpart, llegendPoint = workspace:FindPartOnRay(llegray, char) | |
1668 | ||
1669 | if hum.Health > 0 and noidle == false then | |
1670 | if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude >= 5 and jumped == false then | |
1671 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new((change/5)*math.sin(sine/4), 1.5, -.2) * CFrame.Angles(math.rad((torso.Velocity*Vector3.new(1, 0, 1)).magnitude/35),torsorotY, math.rad(0)+torsorotY), 0.4) | |
1672 | hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles((change/10)*math.cos(sine/2)+0.1,-(change/10)*math.cos(sine/4)-(torsorotY/5),(change/2)*math.sin(sine/4)), 0.1) | |
1673 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.62-(movement/40)*math.cos(sine/4)/3,(movement/150)+(movement/40)*math.cos(sine/4))*CFrame.Angles(math.rad(-5-(movement*2)*math.cos(sine/4))+ -(movement/10)*math.sin(sine/4),math.rad(0-(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2) | |
1674 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.62+(movement/40)*math.cos(sine/4)/3,(movement/150)-(movement/40)*math.cos(sine/4))*CFrame.Angles(math.rad(-5+(movement*2)*math.cos(sine/4))+ (movement/10)*math.sin(sine/4),math.rad(0-(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2) | |
1675 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1.05+(change/2)*math.cos(sine/2), 0) * CFrame.Angles(math.rad(-(change*20)-(movement/20)*math.cos(sine/2)), torsorotY2+math.rad(0-4*math.cos(sine/4)), torsorotY2+math.rad(0-1*math.cos(sine/4))), 0.1) | |
1676 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,(-0.85-(movement/15)*math.cos(sine/4)/2),-0.1+(movement/15)*math.cos(sine/4))*CFrame.Angles(math.rad(-10+(change*5)-movement*math.cos(sine/4))+ -(movement/10)*math.sin(sine/4),math.rad(0+(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2) | |
1677 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,(-0.85+(movement/15)*math.cos(sine/4)/2),-0.1-(movement/15)*math.cos(sine/4))*CFrame.Angles(math.rad(-10+(change*5)+movement*math.cos(sine/4))+ (movement/10)*math.sin(sine/4),math.rad(0+(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2) | |
1678 | elseif jumped == true then | |
1679 | didjump = true | |
1680 | jumppower = root.Velocity.Y | |
1681 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.1) * CFrame.Angles(0,0,0), 0.4) | |
1682 | hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(math.rad(-velocityYFall3/5),0,0), 0.1) | |
1683 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55-velocityYFall3/70,0)*CFrame.Angles(math.rad(-velocityYFall3/10),math.rad(0),math.rad(velocityYFall)), 0.2) | |
1684 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55-velocityYFall3/70,0)*CFrame.Angles(math.rad(-velocityYFall3/10),math.rad(0),math.rad(-velocityYFall)), 0.2) | |
1685 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(velocityYFall3/10),math.rad(0), math.rad(0)), 0.1) | |
1686 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,-0.925,0)*CFrame.Angles(math.rad(-35),math.rad(0),math.rad(-2)), 0.2) | |
1687 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,0,-0.8)*CFrame.Angles(math.rad(-25),math.rad(0),math.rad(2)), 0.2) | |
1688 | elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 5*size then | |
1689 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5*size, -.1*size) * CFrame.Angles(math.rad((torso.Velocity*Vector3.new(1, 0, 1)).magnitude/35),0, 0), 0.4) | |
1690 | hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0.05*math.cos(sine/16)+0.15,0.05*math.cos(sine/32),0.01*math.cos(sine/32)), 0.1) | |
1691 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5*size,0.55*size-(0.1*size)*math.cos(sine/16)/3,-0.05-0.1*size*math.cos(sine/16))*CFrame.Angles(math.rad(-2+4*math.cos(sine/16)),math.rad(-5-5*math.cos(sine/16)),math.rad(-6+2*math.cos(sine/16))), 0.2) | |
1692 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5*size,0.55*size-(0.1*size)*math.cos(sine/16)/3,-0.05-0.1*size*math.cos(sine/16))*CFrame.Angles(math.rad(-2+4*math.cos(sine/16)),math.rad(5+5*math.cos(sine/16)),math.rad(6-2*math.cos(sine/16))), 0.2) | |
1693 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1.1*size-(0.1*size)*math.cos(sine/16)-hum.HipHeight, 0) * CFrame.Angles(math.rad(0-2*math.cos(sine/16)),math.rad(0), math.rad(0-1*math.cos(sine/32))), 0.1) | |
1694 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(0,llegendPoint.Y-lleg.Position.Y,0)*CFrame.new(-0.5*size,0*size+(0.1*size)*math.cos(sine/16),0)*CFrame.Angles(math.rad(0+2*math.cos(sine/16)),math.rad(10+2*math.cos(sine/16)),math.rad(-5+1*math.cos(sine/32))), 0.2) | |
1695 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0,rlegendPoint.Y-rleg.Position.Y,0)*CFrame.new(0.5*size,0*size+(0.1*size)*math.cos(sine/16),0)*CFrame.Angles(math.rad(0+2*math.cos(sine/16)),math.rad(-10-2*math.cos(sine/16)),math.rad(5+1*math.cos(sine/32))), 0.2) | |
1696 | end | |
1697 | end | |
1698 | if didjump == true and jumped == false and jumppower < 0 then | |
1699 | didjump = false | |
1700 | jumpimpact() | |
1701 | end | |
1702 | ||
1703 | local chance = math.random(0,10000)/100 | |
1704 | if chance <= 5 + (kills/2) then | |
1705 | if glitched == false then | |
1706 | backup = hed.Weld.C1 | |
1707 | end | |
1708 | if torso:FindFirstChild("MusicRuin") then | |
1709 | equalizer.HighGain = 0 | |
1710 | equalizer.MidGain = -20 | |
1711 | equalizer.LowGain = -80 | |
1712 | end | |
1713 | hed.Weld.C1 = glitchedC1 | |
1714 | local glitch_color = Color3.fromHSV(math.random(0,1000)/1000,1,1) | |
1715 | hed.Color = glitch_color | |
1716 | torso.Color = glitch_color | |
1717 | rarm.Color = glitch_color | |
1718 | larm.Color = glitch_color | |
1719 | rleg.Color = glitch_color | |
1720 | lleg.Color = glitch_color | |
1721 | shake(5) | |
1722 | glitched = true | |
1723 | hed.face.Texture = "rbxassetid://20722130" | |
1724 | sond:Resume() | |
1725 | else | |
1726 | if glitched == true then | |
1727 | glitched = false | |
1728 | hed.Weld.C1 = backup | |
1729 | glitchedC1 = backup*CFrame.Angles(math.rad(math.random(-40,40)),math.rad(math.random(-40,40)),math.rad(math.random(-20,20))) | |
1730 | end | |
1731 | if torso:FindFirstChild("MusicRuin") then | |
1732 | equalizer.HighGain = 0 | |
1733 | equalizer.MidGain = 0 | |
1734 | equalizer.LowGain = 0 | |
1735 | end | |
1736 | hed.BrickColor = skin_color | |
1737 | torso.BrickColor = skin_color | |
1738 | rarm.BrickColor = skin_color | |
1739 | larm.BrickColor = skin_color | |
1740 | rleg.BrickColor = skin_color | |
1741 | lleg.BrickColor = skin_color | |
1742 | hed.face.Texture = "rbxassetid://20722130" | |
1743 | sond:Pause() | |
1744 | end | |
1745 | ||
1746 | timeposition = soundz.TimePosition | |
1747 | sine = sine + change | |
1748 | hum.Health = math.huge | |
1749 | hum.MaxHealth = math.huge | |
1750 | end) | |
1751 | if 0 < #partEffects then | |
1752 | for e = 1, #partEffects do | |
1753 | if partEffects[e] ~= nil then | |
1754 | local Thing = partEffects[e] | |
1755 | if Thing ~= nil then | |
1756 | local Part = Thing[1] | |
1757 | local Mode = Thing[2] | |
1758 | local Delay = Thing[3] | |
1759 | local IncX = Thing[4] | |
1760 | local IncY = Thing[5] | |
1761 | local IncZ = Thing[6] | |
1762 | if 1 >= Thing[1].Transparency then | |
1763 | if Thing[2] == "Block1" then | |
1764 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
1765 | local Mesh = Thing[1].Mesh | |
1766 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1767 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1768 | elseif Thing[2] == "Block2" then | |
1769 | Thing[1].CFrame = Thing[1].CFrame | |
1770 | local Mesh = Thing[7] | |
1771 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1772 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1773 | elseif Thing[2] == "Cylinder" then | |
1774 | local Mesh = Thing[1].Mesh | |
1775 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1776 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1777 | elseif Thing[2] == "Blood" then | |
1778 | local Mesh = Thing[7] | |
1779 | Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0) | |
1780 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1781 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1782 | elseif Thing[2] == "Elec" then | |
1783 | local Mesh = Thing[1].Mesh | |
1784 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9]) | |
1785 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1786 | elseif Thing[2] == "Disappear" then | |
1787 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1788 | elseif Thing[2] == "Shatter" then | |
1789 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1790 | Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0) | |
1791 | Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0) | |
1792 | Thing[6] = Thing[6] + Thing[5] | |
1793 | end | |
1794 | else | |
1795 | Part:Destroy() | |
1796 | table.remove(partEffects, e) | |
1797 | end | |
1798 | end | |
1799 | end | |
1800 | end | |
1801 | end |