SHOW:
|
|
- or go back to the newest paste.
1 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
2 | local Player,game,owner = owner,game | |
3 | local RealPlayer = Player | |
4 | do | |
5 | print("FE Compatibility code by Mokiros") | |
6 | local rp = RealPlayer | |
7 | script.Parent = rp.Character | |
8 | ||
9 | --RemoteEvent for communicating | |
10 | local Event = Instance.new("RemoteEvent") | |
11 | Event.Name = "UserInput_Event" | |
12 | ||
13 | --Fake event to make stuff like Mouse.KeyDown work | |
14 | local function fakeEvent() | |
15 | local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end} | |
16 | t.connect = t.Connect | |
17 | return t | |
18 | end | |
19 | ||
20 | --Creating fake input objects with fake variables | |
21 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} | |
22 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
23 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
24 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
25 | end} | |
26 | --Merged 2 functions into one by checking amount of arguments | |
27 | CAS.UnbindAction = CAS.BindAction | |
28 | ||
29 | --This function will trigger the events that have been :Connect()'ed | |
30 | local function te(self,ev,...) | |
31 | local t = m[ev] | |
32 | if t and t._fakeEvent then | |
33 | for _,f in pairs(t.Functions) do | |
34 | f(...) | |
35 | end | |
36 | end | |
37 | end | |
38 | m.TrigEvent = te | |
39 | UIS.TrigEvent = te | |
40 | ||
41 | Event.OnServerEvent:Connect(function(plr,io) | |
42 | if plr~=rp then return end | |
43 | m.Target = io.Target | |
44 | m.Hit = io.Hit | |
45 | if not io.isMouse then | |
46 | local b = io.UserInputState == Enum.UserInputState.Begin | |
47 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
48 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
49 | end | |
50 | for _,t in pairs(CAS.Actions) do | |
51 | for _,k in pairs(t.Keys) do | |
52 | if k==io.KeyCode then | |
53 | t.Function(t.Name,io.UserInputState,io) | |
54 | end | |
55 | end | |
56 | end | |
57 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
58 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
59 | end | |
60 | end) | |
61 | Event.Parent = NLS([==[ | |
62 | local Player = game:GetService("Players").LocalPlayer | |
63 | local Event = script:WaitForChild("UserInput_Event") | |
64 | ||
65 | local Mouse = Player:GetMouse() | |
66 | local UIS = game:GetService("UserInputService") | |
67 | local input = function(io,a) | |
68 | if a then return end | |
69 | --Since InputObject is a client-side instance, we create and pass table instead | |
70 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target}) | |
71 | end | |
72 | UIS.InputBegan:Connect(input) | |
73 | UIS.InputEnded:Connect(input) | |
74 | ||
75 | local h,t | |
76 | --Give the server mouse data 30 times every second, but only if the values changed | |
77 | --If player is not moving their mouse, client won't fire events | |
78 | while wait(1/30) do | |
79 | if h~=Mouse.Hit or t~=Mouse.Target then | |
80 | h,t=Mouse.Hit,Mouse.Target | |
81 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
82 | end | |
83 | end]==],Player.Character) | |
84 | ||
85 | ----Sandboxed game object that allows the usage of client-side methods and services | |
86 | --Real game object | |
87 | local _rg = game | |
88 | ||
89 | --Metatable for fake service | |
90 | local fsmt = { | |
91 | __index = function(self,k) | |
92 | local s = rawget(self,"_RealService") | |
93 | if s then return s[k] end | |
94 | end, | |
95 | __newindex = function(self,k,v) | |
96 | local s = rawget(self,"_RealService") | |
97 | if s then s[k]=v end | |
98 | end, | |
99 | __call = function(self,...) | |
100 | local s = rawget(self,"_RealService") | |
101 | if s then return s(...) end | |
102 | end | |
103 | } | |
104 | local function FakeService(t,RealService) | |
105 | t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService | |
106 | return setmetatable(t,fsmt) | |
107 | end | |
108 | ||
109 | --Fake game object | |
110 | local g = { | |
111 | GetService = function(self,s) | |
112 | return self[s] | |
113 | end, | |
114 | Players = FakeService({ | |
115 | LocalPlayer = FakeService({GetMouse=function(self)return m end},Player) | |
116 | },"Players"), | |
117 | UserInputService = FakeService(UIS,"UserInputService"), | |
118 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
119 | } | |
120 | rawset(g.Players,"localPlayer",g.Players.LocalPlayer) | |
121 | g.service = g.GetService | |
122 | ||
123 | g.RunService = FakeService({ | |
124 | RenderStepped = _rg:GetService("RunService").Heartbeat, | |
125 | BindToRenderStep = function(self,name,_,fun) | |
126 | ||
127 | end, | |
128 | UnbindFromRenderStep = function(self,name) | |
129 | self._btrs[name]:Disconnect() | |
130 | end, | |
131 | },"RunService") | |
132 | ||
133 | setmetatable(g,{ | |
134 | __index=function(self,s) | |
135 | return _rg:GetService(s) or typeof(_rg[s])=="function" | |
136 | and function(_,...)return _rg[s](_rg,...)end or _rg[s] | |
137 | end, | |
138 | __newindex = fsmt.__newindex, | |
139 | __call = fsmt.__call | |
140 | }) | |
141 | --Changing owner to fake player object to support owner:GetMouse() | |
142 | game,owner = g,g.Players.LocalPlayer | |
143 | end | |
144 | ||
145 | --// Created by 1x1x1x1IAMbck \\-- | |
146 | --// Remake from chara \\-- | |
147 | ||
148 | --// Whitelist \\-- | |
149 | ||
150 | ||
151 | -- friend list | |
152 | print([[ | |
153 | ___________________________________ | |
154 | ||
155 | (EDIT BY MICHEAL2358) | |
156 | Build 0001 | |
157 | Working whitelist | |
158 | __________________________________ | |
159 | ||
160 | MICHEAL THE MURDER IS BACK | |
161 | FOR WHAT? | |
162 | HE WANT KILL NEPTUNIAN V | |
163 | (you can make video on this....if you want) | |
164 | ]]) | |
165 | ||
166 | ||
167 | --// Main \\-- | |
168 | local p = owner | |
169 | local char = p.Character | |
170 | local plr = game.Players.LocalPlayer | |
171 | local character = plr.Character | |
172 | player = game:GetService("Players").LocalPlayer | |
173 | chara = player.Character | |
174 | local humanoid = character.Humanoid | |
175 | chara.Humanoid.MaxHealth = math.huge | |
176 | chara.Humanoid.Health = math.huge | |
177 | ||
178 | humanoid.Changed:connect(function() | |
179 | if chara.Humanoid.Health > math.huge then | |
180 | chara.Humanoid.Health = math.huge | |
181 | end | |
182 | end) | |
183 | mouse = game.Players.LocalPlayer:GetMouse() | |
184 | player = oner | |
185 | local ColorArray = {ColorSequenceKeypoint.new(0, Color3.new(0/0,0/255,0/255)),ColorSequenceKeypoint.new(1, Color3.new(0/0,0/0,0/0))} | |
186 | local Player = game.Players.LocalPlayer | |
187 | local Character = Player.Character | |
188 | local torso = Character.Torso | |
189 | local hed = Character.Head | |
190 | local p = game.Players.LocalPlayer | |
191 | local char = p.Character | |
192 | RArm = Character["Right Arm"] | |
193 | LArm = Character["Left Arm"] | |
194 | RLeg = Character["Right Leg"] | |
195 | LLeg = Character["Left Leg"] | |
196 | local p = owner | |
197 | local char = p.Character | |
198 | local mouse = p:GetMouse() | |
199 | local larm = char:WaitForChild("Left Arm") | |
200 | local rarm = char:WaitForChild("Right Arm") | |
201 | local lleg = char:WaitForChild("Left Leg") | |
202 | local rleg = char:WaitForChild("Right Leg") | |
203 | local hed = char:WaitForChild("Head") | |
204 | local torso = char:WaitForChild("Torso") | |
205 | local root = char:WaitForChild("HumanoidRootPart") | |
206 | local hum = char:FindFirstChildOfClass("Humanoid") | |
207 | local debris = game:GetService("Debris") | |
208 | local input = game:GetService("UserInputService") | |
209 | local run = game:GetService("RunService") | |
210 | local rs = run.RenderStepped | |
211 | local wingpose = "Idle" | |
212 | local DebrisModel = Instance.new("Model",char) | |
213 | DebrisModel.Name = "Debris" | |
214 | repeat rs:wait() until p.CharacterAppearanceLoaded | |
215 | local slashsound1 = Instance.new("Sound", hed) | |
216 | slashsound1.SoundId = "rbxassetid://315170694" | |
217 | slashsound1.Volume = 1.2 | |
218 | slashsound1.Pitch = 1 | |
219 | slashsound1.Looped = true | |
220 | local slashsound2 = Instance.new("Sound", hed) | |
221 | slashsound2.SoundId = "rbxassetid://323578832" | |
222 | slashsound2.Volume = 5 | |
223 | local slashsound3 = Instance.new("Sound", hed) | |
224 | slashsound3.SoundId = "rbxassetid://1818153677" | |
225 | slashsound3.Volume = 1000 | |
226 | local slashsound4 = Instance.new("Sound", hed) | |
227 | slashsound4.SoundId = "rbxassetid://184605339" | |
228 | slashsound4.Volume = 500 | |
229 | local slashsoundglobal = Instance.new("Sound", hed) | |
230 | slashsoundglobal.SoundId = "rbxassetid://289556450" --323578832 | |
231 | slashsoundglobal.Volume = 500 | |
232 | slashsoundglobal.MaxDistance = 10000 | |
233 | local S = setmetatable({},{__index = function(s,i) return game:service(i) end}) | |
234 | local Plrs = S.Players | |
235 | local Plr = Plrs.LocalPlayer | |
236 | local Char = Plr.Character | |
237 | local Hum = Char:FindFirstChildOfClass'Humanoid' | |
238 | local RArm = Char["Right Arm"] | |
239 | local LArm = Char["Left Arm"] | |
240 | local RLeg = Char["Right Leg"] | |
241 | local LLeg = Char["Left Leg"] | |
242 | local Root = Char:FindFirstChild'HumanoidRootPart' | |
243 | local Torso = Char.Torso | |
244 | local Head = Char.Head | |
245 | local NeutralAnims = true | |
246 | local Attack = false | |
247 | local BloodPuddles = {} | |
248 | local Effects = {} | |
249 | local Debounces = {Debounces={}} | |
250 | local Mouse = Plr:GetMouse() | |
251 | local Hit = {} | |
252 | local Sine = 0 | |
253 | local Change = 1 | |
254 | local Souls = 0 | |
255 | mouse = game.Players.LocalPlayer:GetMouse() | |
256 | player = owner | |
257 | local ColorArray = {ColorSequenceKeypoint.new(0, Color3.new(0/0,0/255,0/255)),ColorSequenceKeypoint.new(1, Color3.new(0/0,0/0,0/0))} | |
258 | local Player = game.Players.LocalPlayer | |
259 | local Character = Player.Character | |
260 | local torso = Character.Torso | |
261 | local hed = Character.Head | |
262 | local p = game.Players.LocalPlayer | |
263 | local char = p.Character | |
264 | RArm = Character["Right Arm"] | |
265 | LArm = Character["Left Arm"] | |
266 | RLeg = Character["Right Leg"] | |
267 | LLeg = Character["Left Leg"] | |
268 | ||
269 | noidle = false | |
270 | shift = false | |
271 | control = false | |
272 | no_nosound_able = false | |
273 | kills = -20 | |
274 | ||
275 | --// Shortcut Variables \\-- | |
276 | ------------------------------------------ | |
277 | ||
278 | --[[ | |
279 | local vel = Instance.new("BodyVelocity", game.Players.LocalPlayer.Character.Torso) | |
280 | vel.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * -5 | |
281 | vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge) | |
282 | --]] | |
283 | --Credit To Rufus14 | |
284 | --I just edit it a bit ^_^ | |
285 | mouse = game.Players.LocalPlayer:GetMouse() | |
286 | function ragdoll() | |
287 | game.Players.LocalPlayer.Character.Archivable = true | |
288 | clone = game.Players.LocalPlayer.Character:Clone() | |
289 | clone.Parent = workspace | |
290 | for i,v in pairs(clone:GetChildren()) do | |
291 | if v.ClassName == "Script" or v.ClassName == "LocalScript" then | |
292 | v:destroy() | |
293 | end | |
294 | for i,p in pairs(v:GetChildren()) do | |
295 | if p.ClassName == "Weld" or p.ClassName == "Motor6D" or p.ClassName == "BodyVelocity" then | |
296 | p:destroy() | |
297 | end | |
298 | end | |
299 | end | |
300 | for i,t in pairs(game.Players.LocalPlayer.Character:GetChildren()) do | |
301 | if t.ClassName == "Accessory" or t.ClassName == "ForceField" then | |
302 | t:destroy() | |
303 | end | |
304 | end | |
305 | vel = Instance.new("BodyVelocity", clone.Torso) | |
306 | vel.Velocity = clone.Torso.CFrame.lookVector * -5 | |
307 | vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge) | |
308 | clone.Head.face.Texture = "http://www.roblox.com/asset/?id=176777497" | |
309 | using = false | |
310 | hit = Instance.new("Sound", clone.Torso) | |
311 | hit.SoundId = "rbxassetid://260430060" | |
312 | hit.Volume = 5 | |
313 | hit1 = Instance.new("Sound", clone.Torso) | |
314 | hit1.SoundId = "rbxassetid://138087186" | |
315 | hit1.Volume = 5 | |
316 | hit2 = Instance.new("Sound", clone.Torso) | |
317 | hit2.SoundId = "rbxassetid://131237241" | |
318 | hit2.Volume = 5 | |
319 | hit3 = Instance.new("Sound", clone.Torso) | |
320 | hit3.SoundId = "rbxassetid://278062209" | |
321 | hit3.Volume = 5 | |
322 | hit3.TimePosition = 0.33 | |
323 | ded = Instance.new("Sound", clone.Torso) | |
324 | ded.SoundId = "rbxassetid://163154423" | |
325 | ded.Volume = 5 | |
326 | local leftarm = clone:findFirstChild("Left Arm") | |
327 | local rightrm = clone:findFirstChild("Right Arm") | |
328 | local leftleg = clone:findFirstChild("Left Leg") | |
329 | local rightleg = clone:findFirstChild("Right Leg") | |
330 | local head = clone:findFirstChild("Head") | |
331 | local welding = Instance.new("Weld", clone.Torso) | |
332 | welding.Part0 = clone.Torso | |
333 | welding.Part1 = head | |
334 | welding.C0 = welding.C0 * CFrame.new(0,1.5,0) | |
335 | for i, g in pairs(game.Players.LocalPlayer.Character:GetChildren()) do | |
336 | if g.ClassName == "Part" then | |
337 | g:destroy() | |
338 | end | |
339 | end | |
340 | for i, h in pairs(game.Players.LocalPlayer.Character:GetChildren()) do | |
341 | if h.ClassName == "Accesory" then | |
342 | h:destroy() | |
343 | end | |
344 | end | |
345 | game.Workspace.CurrentCamera.CameraSubject = head | |
346 | if leftleg ~= nil then | |
347 | local glue = Instance.new("Glue", clone.Torso) | |
348 | glue.Part0 = clone.Torso | |
349 | glue.Part1 = leftleg | |
350 | glue.Name = "Left leg" | |
351 | local collider = Instance.new("Part", leftleg) | |
352 | collider.Position = Vector3.new(0,999,0) | |
353 | collider.Size = Vector3.new(1.7, 1, 1) | |
354 | collider.Shape = "Cylinder" | |
355 | local weld = Instance.new("Weld", collider) | |
356 | weld.Part0 = leftleg | |
357 | weld.Part1 = collider | |
358 | weld.C0 = CFrame.Angles(0, 0, 80) | |
359 | collider.TopSurface = "Smooth" | |
360 | collider.BottomSurface = "Smooth" | |
361 | collider.formFactor = "Symmetric" | |
362 | glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
363 | glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
364 | collider.Transparency = 1 | |
365 | end | |
366 | ------------ | |
367 | if rightleg ~= nil then | |
368 | local glue1 = Instance.new("Glue", clone.Torso) | |
369 | glue1.Part0 = clone.Torso | |
370 | glue1.Part1 = rightleg | |
371 | glue1.Name = "Right leg" | |
372 | local collider1 = Instance.new("Part", rightleg) | |
373 | collider1.Position = Vector3.new(0,999,0) | |
374 | collider1.Size = Vector3.new(1.7, 1, 1) | |
375 | collider1.Shape = "Cylinder" | |
376 | local weld1 = Instance.new("Weld", collider1) | |
377 | weld1.Part0 = rightleg | |
378 | weld1.Part1 = collider1 | |
379 | weld1.C0 = CFrame.Angles(0, 0, 80) | |
380 | collider1.TopSurface = "Smooth" | |
381 | collider1.BottomSurface = "Smooth" | |
382 | collider1.formFactor = "Symmetric" | |
383 | glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
384 | glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
385 | collider1.Transparency = 1 | |
386 | end | |
387 | ------------ | |
388 | if rightrm ~= nil then | |
389 | local glue11 = Instance.new("Glue", clone.Torso) | |
390 | glue11.Part0 = clone.Torso | |
391 | glue11.Part1 = rightrm | |
392 | glue11.Name = "Right shoulder" | |
393 | local collider11 = Instance.new("Part", rightrm) | |
394 | collider11.Position = Vector3.new(0,9999,0) | |
395 | collider11.Size = Vector3.new(1.8,1,1) | |
396 | collider11.Shape = "Cylinder" | |
397 | local weld11 = Instance.new("Weld", collider11) | |
398 | weld11.Part0 = rightrm | |
399 | weld11.Part1 = collider11 | |
400 | weld11.C0 = CFrame.Angles(0, 0, 80) | |
401 | collider11.TopSurface = "Smooth" | |
402 | collider11.BottomSurface = "Smooth" | |
403 | collider11.formFactor = "Symmetric" | |
404 | glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
405 | glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
406 | collider11.Transparency = 1 | |
407 | end | |
408 | ------------ | |
409 | if leftarm ~= nil then | |
410 | local glue111 = Instance.new("Glue", clone.Torso) | |
411 | glue111.Part0 = clone.Torso | |
412 | glue111.Part1 = leftarm | |
413 | glue111.Name = "Left shoulder" | |
414 | local collider111 = Instance.new("Part", leftarm) | |
415 | collider111.Position = Vector3.new(0,9999,0) | |
416 | collider111.Size = Vector3.new(1.8,1,1) | |
417 | collider111.Shape = "Cylinder" | |
418 | local weld111 = Instance.new("Weld", collider111) | |
419 | weld111.Part0 = leftarm | |
420 | weld111.Part1 = collider111 | |
421 | weld111.C0 = CFrame.Angles(0, 0, 80) | |
422 | collider111.TopSurface = "Smooth" | |
423 | collider111.BottomSurface = "Smooth" | |
424 | collider111.formFactor = "Symmetric" | |
425 | glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
426 | glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
427 | collider111.Transparency = 1 | |
428 | ---------------- | |
429 | sensoring = Instance.new("Part", clone.Torso) | |
430 | sensoring.Size = Vector3.new(1.2,1.1,0.8) | |
431 | sensoring.CanCollide = false | |
432 | sensoring.Position = clone.Torso.Position | |
433 | local welder = Instance.new("Weld", sensoring) | |
434 | welder.Part0 = clone.Torso | |
435 | welder.Part1 = sensoring | |
436 | welder.C0 = welder.C0 * CFrame.new(0,0,1.05) | |
437 | sensoring.Transparency = 1 | |
438 | ----------------- | |
439 | sensoring1 = Instance.new("Part", clone.Torso) | |
440 | sensoring1.Size = Vector3.new(1.2,1.1,0.8) | |
441 | sensoring1.CanCollide = false | |
442 | sensoring1.Position = clone.Torso.Position | |
443 | local welder1 = Instance.new("Weld", sensoring) | |
444 | welder1.Part0 = clone.Torso | |
445 | welder1.Part1 = sensoring1 | |
446 | welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05) | |
447 | sensoring1.Transparency = 1 | |
448 | end | |
449 | clone.Name = game.Players.LocalPlayer.Character.Name.." (DEAD)" | |
450 | ded:Play() | |
451 | vel:destroy() | |
452 | wait(0.5) | |
453 | local function touch() | |
454 | if not using then | |
455 | using = true | |
456 | local Math = math.random(1,4) | |
457 | if Math == 1 then | |
458 | hit:Play() | |
459 | end | |
460 | if Math == 2 then | |
461 | hit1:Play() | |
462 | end | |
463 | if Math == 3 then | |
464 | hit2:Play() | |
465 | end | |
466 | if Math == 4 then | |
467 | hit3:Play() | |
468 | end | |
469 | wait(0.1) | |
470 | using = false | |
471 | end | |
472 | end | |
473 | sensoring.Touched:connect(touch) | |
474 | sensoring1.Touched:connect(touch) | |
475 | wait(4.47) | |
476 | hit1.Volume = 0 | |
477 | hit2.Volume = 0 | |
478 | hit3.Volume = 0 | |
479 | hit.Volume = 0 | |
480 | end | |
481 | ||
482 | game.Players.LocalPlayer.Character.Humanoid.Died:connect(ragdoll) | |
483 | ||
484 | --di ent | |
485 | ------------------------------------------ | |
486 | local Hair = Instance.new("Part", char) | |
487 | Hair.Name = "Hair" | |
488 | Hair.CanCollide = false | |
489 | Hair.BrickColor = BrickColor.new("Institutional white") | |
490 | Hair.Transparency = 0 | |
491 | Hair.Material = "Plastic" | |
492 | Hair.Size = Vector3.new(1, 1, 2) | |
493 | Hair.TopSurface = Enum.SurfaceType.Smooth | |
494 | Hair.BottomSurface = Enum.SurfaceType.Smooth | |
495 | ||
496 | local Weld = Instance.new("Weld", Hair) | |
497 | Weld.Part0 = hed | |
498 | Weld.Part1 = Hair | |
499 | Weld.C1 = CFrame.new(0, -.6, 0) | |
500 | Weld.C0 = CFrame.Angles(math.rad(0),math.rad(0),0) | |
501 | ||
502 | local M2 = Instance.new("SpecialMesh") | |
503 | M2.Parent = Hair | |
504 | M2.MeshId = "http://www.roblox.com/asset/?id=16627529" | |
505 | M2.TextureId = "http://www.roblox.com/asset/?id=16627494" | |
506 | M2.Scale = Vector3.new(1, 1, 1) | |
507 | ------------------------------------------------------- | |
508 | for i,v in pairs(char:children()) do | |
509 | if v:IsA("Shirt") and v:IsA("Pants") and v:IsA("Hat") and v:IsA("Accessory") then | |
510 | v:Remove() | |
511 | end | |
512 | end | |
513 | shirt = Instance.new("Shirt", char) | |
514 | shirt.Name = "Shirt" | |
515 | pants = Instance.new("Pants", char) | |
516 | pants.Name = "Pants" | |
517 | char.Shirt.ShirtTemplate = "rbxassetid://276792537" | |
518 | char.Pants.PantsTemplate = "rbxassetid://276792689" | |
519 | ||
520 | ||
521 | - | music.Volume = 4 |
521 | + | function RemoveOutlines(part) |
522 | part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10 | |
523 | end | |
524 | ||
525 | local Create = LoadLibrary("RbxUtility").Create | |
526 | ||
527 | CFuncs = { | |
528 | ["Part"] = { | |
529 | Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
530 | local Part = Create("Part"){ | |
531 | Parent = Parent, | |
532 | Reflectance = Reflectance, | |
533 | Transparency = Transparency, | |
534 | CanCollide = false, | |
535 | Locked = true, | |
536 | BrickColor = BrickColor.new(tostring(BColor)), | |
537 | Name = Name, | |
538 | Size = Size, | |
539 | Material = Material, | |
540 | } | |
541 | RemoveOutlines(Part) | |
542 | return Part | |
543 | end; | |
544 | }; | |
545 | ||
546 | ["Mesh"] = { | |
547 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
548 | local Msh = Create(Mesh){ | |
549 | Parent = Part, | |
550 | Offset = OffSet, | |
551 | Scale = Scale, | |
552 | } | |
553 | if Mesh == "SpecialMesh" then | |
554 | Msh.MeshType = MeshType | |
555 | Msh.MeshId = MeshId | |
556 | end | |
557 | return Msh | |
558 | end; | |
559 | }; | |
560 | ||
561 | ["Mesh"] = { | |
562 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
563 | local Msh = Create(Mesh){ | |
564 | Parent = Part, | |
565 | Offset = OffSet, | |
566 | Scale = Scale, | |
567 | } | |
568 | if Mesh == "SpecialMesh" then | |
569 | Msh.MeshType = MeshType | |
570 | Msh.MeshId = MeshId | |
571 | end | |
572 | return Msh | |
573 | end; | |
574 | }; | |
575 | ||
576 | ["Weld"] = { | |
577 | Create = function(Parent, Part0, Part1, C0, C1) | |
578 | local Weld = Create("Weld"){ | |
579 | Parent = Parent, | |
580 | Part0 = Part0, | |
581 | Part1 = Part1, | |
582 | C0 = C0, | |
583 | C1 = C1, | |
584 | } | |
585 | return Weld | |
586 | end; | |
587 | }; | |
588 | ||
589 | ["Sound"] = { | |
590 | Create = function(id, par, vol, pit) | |
591 | coroutine.resume(coroutine.create(function() | |
592 | local S = Create("Sound"){ | |
593 | Volume = vol, | |
594 | Name = "EffectSoundo", | |
595 | Pitch = pit or 1, | |
596 | SoundId = id, | |
597 | Parent = par or workspace, | |
598 | } | |
599 | wait() | |
600 | S:play() | |
601 | game:GetService("Debris"):AddItem(S, 10) | |
602 | end)) | |
603 | end; | |
604 | }; | |
605 | ||
606 | ["LongSound"] = { | |
607 | Create = function(id, par, vol, pit) | |
608 | coroutine.resume(coroutine.create(function() | |
609 | local S = Create("Sound"){ | |
610 | Volume = vol, | |
611 | Pitch = pit or 1, | |
612 | SoundId = id, | |
613 | Parent = par or workspace, | |
614 | } | |
615 | wait() | |
616 | S:play() | |
617 | game:GetService("Debris"):AddItem(S, 60) | |
618 | end)) | |
619 | end; | |
620 | }; | |
621 | ||
622 | ["ParticleEmitter"] = { | |
623 | Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread) | |
624 | local fp = Create("ParticleEmitter"){ | |
625 | Parent = Parent, | |
626 | Color = ColorSequence.new(Color1, Color2), | |
627 | LightEmission = LightEmission, | |
628 | Size = Size, | |
629 | Texture = Texture, | |
630 | Transparency = Transparency, | |
631 | ZOffset = ZOffset, | |
632 | Acceleration = Accel, | |
633 | Drag = Drag, | |
634 | LockedToPart = LockedToPart, | |
635 | VelocityInheritance = VelocityInheritance, | |
636 | EmissionDirection = EmissionDirection, | |
637 | Enabled = Enabled, | |
638 | Lifetime = LifeTime, | |
639 | Rate = Rate, | |
640 | Rotation = Rotation, | |
641 | RotSpeed = RotSpeed, | |
642 | Speed = Speed, | |
643 | VelocitySpread = VelocitySpread, | |
644 | } | |
645 | return fp | |
646 | end; | |
647 | }; | |
648 | ||
649 | CreateTemplate = { | |
650 | ||
651 | }; | |
652 | } | |
653 | ||
654 | ||
655 | ||
656 | New = function(Object, Parent, Name, Data) | |
657 | local Object = Instance.new(Object) | |
658 | for Index, Value in pairs(Data or {}) do | |
659 | Object[Index] = Value | |
660 | end | |
661 | Object.Parent = Parent | |
662 | Object.Name = Name | |
663 | return Object | |
664 | end | |
665 | ||
666 | local halocolor = BrickColor.new("Mid gray") | |
667 | local halocolor2 = BrickColor.new("Mid gray") | |
668 | local halocolor3 = BrickColor.new("Really black") | |
669 | local starcolor = BrickColor.new("Bright yellow") | |
670 | local lunacolor = BrickColor.new("Navy blue") | |
671 | local lunacolor2 = BrickColor.new("Bright blue") | |
672 | local wepcolor = BrickColor.new("Deep blue") | |
673 | local maincolor = BrickColor.new("Lapis") | |
674 | local secondcolor = BrickColor.new("Lapis") | |
675 | local m = Instance.new("Model",Character) | |
676 | local m2 = Instance.new("Model",Character) | |
677 | local m3 = Instance.new("Model",Character) | |
678 | local mw1 = Instance.new("Model",Character) | |
679 | local mw2 = Instance.new("Model",Character) | |
680 | local mw3 = Instance.new("Model",Character) | |
681 | local mw4 = Instance.new("Model",Character) | |
682 | ||
683 | ------------------------------------------------------- | |
684 | local music = Instance.new("Sound", game.Players.LocalPlayer.Character) | |
685 | music.SoundId = "rbxassetid://540857600" | |
686 | music.Volume = 1 | |
687 | music:Play() | |
688 | music.Looped = true | |
689 | ------------------------------------------------------- | |
690 | CV="Maroon" | |
691 | Player = game.Players.LocalPlayer | |
692 | Character = Player.Character | |
693 | local txt = Instance.new("BillboardGui", Character) | |
694 | txt.Adornee = Character .Head | |
695 | txt.Name = "_status" | |
696 | txt.Size = UDim2.new(2, 0, 1.2, 0) | |
697 | txt.StudsOffset = Vector3.new(-9, 8, 0) | |
698 | local text = Instance.new("TextLabel", txt) | |
699 | text.Size = UDim2.new(10, 0, 7, 0) | |
700 | text.FontSize = "Size24" | |
701 | text.TextScaled = true | |
702 | text.TextTransparency = 0 | |
703 | text.BackgroundTransparency = 1 | |
704 | text.TextTransparency = 0 | |
705 | text.TextStrokeTransparency = 0 | |
706 | text.Font = "Bodoni" | |
707 | text.TextStrokeColor3 = Color3.new(255,0,0) | |
708 | ||
709 | v=Instance.new("Part") | |
710 | v.Name = "ColorBrick" | |
711 | v.Parent=Player.Character | |
712 | v.FormFactor="Symmetric" | |
713 | v.Anchored=true | |
714 | v.CanCollide=false | |
715 | v.BottomSurface="Smooth" | |
716 | v.TopSurface="Smooth" | |
717 | v.Size=Vector3.new(3,3,3) | |
718 | v.Transparency=1 | |
719 | v.CFrame=Character.Torso.CFrame | |
720 | v.BrickColor=BrickColor.new(CV) | |
721 | v.Transparency=1 | |
722 | text.TextColor3 = Color3.new(0,0,0) | |
723 | v.Shape="Block" | |
724 | text.Text = "MICHEAL THE RAGE MURDER" | |
725 | -------------------------------------------------- | |
726 | ||
727 | local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ} | |
728 | local C3 = {N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV} | |
729 | local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis} | |
730 | local M = {C=math.cos,R=math.rad,S=math.sin,P=math.pi,RNG=math.random,MRS=math.randomseed,H=math.huge,RRNG = function(min,max,div) return math.rad(math.random(min,max)/(div or 1)) end} | |
731 | local R3 = {N=Region3.new} | |
732 | local De = S.Debris | |
733 | local WS = workspace | |
734 | local Lght = S.Lighting | |
735 | local RepS = S.ReplicatedStorage | |
736 | local IN = Instance.new | |
737 | local CSK = ColorSequenceKeypoint.new | |
738 | local CS = ColorSequence.new | |
739 | IT = Instance.new | |
740 | CF = CFrame.new | |
741 | VT = Vector3.new | |
742 | RAD = math.rad | |
743 | UD2 = UDim2.new | |
744 | BRICKC = BrickColor.new | |
745 | ANGLES = CFrame.Angles | |
746 | EULER = CFrame.fromEulerAnglesXYZ | |
747 | COS = math.cos | |
748 | ACOS = math.acos | |
749 | SIN = math.sin | |
750 | ASIN = math.asin | |
751 | ABS = math.abs | |
752 | MRANDOM = math.random | |
753 | FLOOR = math.floor | |
754 | ||
755 | --// Controls \\-- | |
756 | -------------------------------------------------------- | |
757 | ||
758 | --// Debounce System \\-- | |
759 | ||
760 | ||
761 | function Debounces:New(name,cooldown) | |
762 | local aaaaa = {Usable=true,Cooldown=cooldown or 2,CoolingDown=false,LastUse=0} | |
763 | setmetatable(aaaaa,{__index = Debounces}) | |
764 | Debounces.Debounces[name] = aaaaa | |
765 | return aaaaa | |
766 | end | |
767 | ||
768 | function Debounces:Use(overrideUsable) | |
769 | assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use") | |
770 | if(self.Usable or overrideUsable)then | |
771 | self.Usable = false | |
772 | self.CoolingDown = true | |
773 | local LastUse = time() | |
774 | self.LastUse = LastUse | |
775 | delay(self.Cooldown or 2,function() | |
776 | if(self.LastUse == LastUse)then | |
777 | self.CoolingDown = false | |
778 | self.Usable = true | |
779 | end | |
780 | end) | |
781 | end | |
782 | end | |
783 | ||
784 | function Debounces:Get(name) | |
785 | assert(typeof(name) == 'string',("bad argument #1 to 'get' (string expected, got %s)"):format(typeof(name) == nil and "no value" or typeof(name))) | |
786 | for i,v in next, Debounces.Debounces do | |
787 | if(i == name)then | |
788 | return v; | |
789 | end | |
790 | end | |
791 | end | |
792 | ||
793 | function Debounces:GetProgressPercentage() | |
794 | assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use") | |
795 | if(self.CoolingDown and not self.Usable)then | |
796 | return math.max( | |
797 | math.floor( | |
798 | ( | |
799 | (time()-self.LastUse)/self.Cooldown or 2 | |
800 | )*100 | |
801 | ) | |
802 | ) | |
803 | else | |
804 | return 100 | |
805 | end | |
806 | end | |
807 | ||
808 | --// Create instance roblox \\-- | |
809 | ||
810 | function Sound(parent,id,pitch,volume,looped,effect,autoPlay) | |
811 | local Sound = IN("Sound") | |
812 | Sound.SoundId = "rbxassetid://".. tostring(id or 0) | |
813 | Sound.Pitch = pitch or 1 | |
814 | Sound.Volume = volume or 1 | |
815 | Sound.Looped = looped or false | |
816 | if(autoPlay)then | |
817 | coroutine.wrap(function() | |
818 | repeat wait() until Sound.IsLoaded | |
819 | Sound.Playing = autoPlay or false | |
820 | end)() | |
821 | end | |
822 | if(not looped and effect)then | |
823 | Sound.Stopped:connect(function() | |
824 | Sound.Volume = 0 | |
825 | Sound:destroy() | |
826 | end) | |
827 | elseif(effect)then | |
828 | warn("Sound can't be looped and a sound effect!") | |
829 | end | |
830 | Sound.Parent =parent or Torso | |
831 | return Sound | |
832 | end | |
833 | ||
834 | function Part(parent,color,material,size,cframe,anchored,cancollide) | |
835 | local part = IN("Part") | |
836 | part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0) | |
837 | part.Material = (material or Enum.Material.SmoothPlastic) | |
838 | part.TopSurface,part.BottomSurface=10,10 | |
839 | part.Size = (size or V3.N(1,1,1)) | |
840 | part.CFrame = (cframe or CF.N(0,0,0)) | |
841 | part.Anchored = (anchored or false) | |
842 | part.CanCollide = (cancollide or false) | |
843 | part.Parent = (parent or Char) | |
844 | return part | |
845 | end | |
846 | function Mesh(parent,meshtype,meshid,textid,scale,offset) | |
847 | local part = IN("SpecialMesh") | |
848 | part.MeshId = meshid or "" | |
849 | part.TextureId = textid or "" | |
850 | part.Scale = scale or V3.N(1,1,1) | |
851 | part.Offset = offset or V3.N(0,0,0) | |
852 | part.MeshType = meshtype or Enum.MeshType.Sphere | |
853 | part.Parent = parent | |
854 | return part | |
855 | end | |
856 | ||
857 | NewInstance = function(instance,parent,properties) | |
858 | local inst = Instance.new(instance,parent) | |
859 | if(properties)then | |
860 | for i,v in next, properties do | |
861 | pcall(function() inst[i] = v end) | |
862 | end | |
863 | end | |
864 | return inst; | |
865 | end | |
866 | ||
867 | function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET) | |
868 | local NEWMESH = IT(MESH) | |
869 | if MESH == "SpecialMesh" then | |
870 | NEWMESH.MeshType = MESHTYPE | |
871 | if MESHID ~= "nil" and MESHID ~= "" then | |
872 | NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID | |
873 | end | |
874 | if TEXTUREID ~= "nil" and TEXTUREID ~= "" then | |
875 | NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID | |
876 | end | |
877 | end | |
878 | NEWMESH.Offset = OFFSET or VT(0, 0, 0) | |
879 | NEWMESH.Scale = SCALE | |
880 | NEWMESH.Parent = PARENT | |
881 | return NEWMESH | |
882 | end | |
883 | ||
884 | function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR) | |
885 | local NEWPART = IT("Part") | |
886 | NEWPART.formFactor = FORMFACTOR | |
887 | NEWPART.Reflectance = REFLECTANCE | |
888 | NEWPART.Transparency = TRANSPARENCY | |
889 | NEWPART.CanCollide = false | |
890 | NEWPART.Locked = true | |
891 | NEWPART.Anchored = true | |
892 | if ANCHOR == false then | |
893 | NEWPART.Anchored = false | |
894 | end | |
895 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
896 | NEWPART.Name = NAME | |
897 | NEWPART.Size = SIZE | |
898 | NEWPART.Position = Torso.Position | |
899 | NEWPART.Material = MATERIAL | |
900 | NEWPART:BreakJoints() | |
901 | NEWPART.Parent = PARENT | |
902 | return NEWPART | |
903 | end | |
904 | ||
905 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
906 | local NEWWELD = IT(TYPE) | |
907 | NEWWELD.Part0 = PART0 | |
908 | NEWWELD.Part1 = PART1 | |
909 | NEWWELD.C0 = C0 | |
910 | NEWWELD.C1 = C1 | |
911 | NEWWELD.Parent = PARENT | |
912 | return NEWWELD | |
913 | end | |
914 | ||
915 | local Instance = setmetatable({ClearChildrenOfClass = function(where,class,recursive) local children = (recursive and where:GetDescendants() or where:GetChildren()) for _,v in next, children do if(v:IsA(class))then v:destroy();end;end;end},{__index = Instance}) | |
916 | ||
917 | ||
918 | ||
919 | ||
920 | --// RSwait \\-- | |
921 | ||
922 | function rswait(value) | |
923 | if value ~= nil and value ~= 0 then | |
924 | for i=1,value do | |
925 | rs:wait() | |
926 | end | |
927 | else | |
928 | rs:wait() | |
929 | end | |
930 | end | |
931 | ||
932 | --// Timestop \\-- | |
933 | ||
934 | local timeposition = 0 | |
935 | ||
936 | function music(id) | |
937 | if not torso:FindFirstChild("MusicRuin") then | |
938 | soundz = Instance.new("Sound",torso) | |
939 | end | |
940 | soundz.Volume = 10 | |
941 | soundz.Name = "MusicRuin" | |
942 | soundz.Looped = true | |
943 | soundz.PlaybackSpeed = 1 | |
944 | soundz.SoundId = "rbxassetid://"..id | |
945 | soundz:Stop() | |
946 | soundz:Play() | |
947 | if no_nosound_able == true then | |
948 | soundz.TimePosition = timeposition | |
949 | end | |
950 | end | |
951 | ||
952 | --// Lerp \\-- | |
953 | ||
954 | function lerp(a, b, t) | |
955 | return a + (b - a)*t | |
956 | end | |
957 | ||
958 | function Lerp(c1,c2,al) | |
959 | local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()} | |
960 | local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()} | |
961 | for i,v in pairs(com1) do | |
962 | com1[i] = v+(com2[i]-v)*al | |
963 | end | |
964 | return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1))) | |
965 | end | |
966 | ||
967 | --// SLerp \\-- | |
968 | ||
969 | function slerp(a, b, t) | |
970 | dot = a:Dot(b) | |
971 | if dot > 0.99999 or dot < -0.99999 then | |
972 | return t <= 0.5 and a or b | |
973 | else | |
974 | r = math.acos(dot) | |
975 | return (a*math.sin((1 - t)*r) + b*math.sin(t*r)) / math.sin(r) | |
976 | end | |
977 | end | |
978 | ||
979 | --// CLerp \\-- | |
980 | ||
981 | function clerp(c1,c2,al) | |
982 | ||
983 | local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()} | |
984 | ||
985 | local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()} | |
986 | ||
987 | for i,v in pairs(com1) do | |
988 | ||
989 | com1[i] = lerp(v,com2[i],al) | |
990 | ||
991 | end | |
992 | ||
993 | return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1))) | |
994 | ||
995 | end | |
996 | ||
997 | --// Find torso \\-- | |
998 | ||
999 | function findAllNearestTorso(pos,dist) | |
1000 | local list = workspace:children() | |
1001 | local torso = {} | |
1002 | local temp = nil | |
1003 | local human = nil | |
1004 | local temp2 = nil | |
1005 | for x = 1, #list do | |
1006 | temp2 = list[x] | |
1007 | if (temp2.className == "Model") and (temp2 ~= char) then | |
1008 | temp = temp2:findFirstChild("Torso") | |
1009 | human = temp2:findFirstChildOfClass("Humanoid") | |
1010 | if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then | |
1011 | if (temp.Position - pos).magnitude < dist then | |
1012 | table.insert(torso,temp) | |
1013 | dist = (temp.Position - pos).magnitude | |
1014 | end | |
1015 | end | |
1016 | end | |
1017 | end | |
1018 | return torso | |
1019 | end | |
1020 | ||
1021 | --// Player Check \\-- | |
1022 | ||
1023 | function checkIfNotPlayer(model) | |
1024 | 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 | |
1025 | return true | |
1026 | else | |
1027 | return false | |
1028 | end | |
1029 | end | |
1030 | ||
1031 | --// Weld \\-- | |
1032 | ||
1033 | function newWeld(wp0, wp1, wc0x, wc0y, wc0z) | |
1034 | ||
1035 | local wld = Instance.new("Weld", wp1) | |
1036 | ||
1037 | wld.Part0 = wp0 | |
1038 | ||
1039 | wld.Part1 = wp1 | |
1040 | ||
1041 | wld.C0 = CFrame.new(wc0x, wc0y, wc0z) | |
1042 | ||
1043 | return wld | |
1044 | ||
1045 | end | |
1046 | ||
1047 | function weld(model) | |
1048 | local parts,last = {} | |
1049 | local function scan(parent) | |
1050 | for _,v in pairs(parent:GetChildren()) do | |
1051 | if (v:IsA("BasePart")) then | |
1052 | if (last) then | |
1053 | local w = Instance.new("Weld") | |
1054 | w.Name = ("%s_Weld"):format(v.Name) | |
1055 | w.Part0,w.Part1 = last,v | |
1056 | w.C0 = last.CFrame:inverse() | |
1057 | w.C1 = v.CFrame:inverse() | |
1058 | w.Parent = last | |
1059 | end | |
1060 | last = v | |
1061 | table.insert(parts,v) | |
1062 | end | |
1063 | scan(v) | |
1064 | end | |
1065 | end | |
1066 | scan(model) | |
1067 | for _,v in pairs(parts) do | |
1068 | v.Anchored = false | |
1069 | v.Locked = true | |
1070 | v.Anchored = false | |
1071 | v.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
1072 | v.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
1073 | v.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
1074 | v.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
1075 | v.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
1076 | v.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
1077 | v.CustomPhysicalProperties = PhysicalProperties.new(0,0,0) | |
1078 | end | |
1079 | end | |
1080 | ||
1081 | --// Weapon Creation \\-- | |
1082 | ||
1083 | function calculate(part,asd) | |
1084 | local Head = hed | |
1085 | local RightShoulder = asd | |
1086 | local RightArm = part | |
1087 | local MousePosition = mouse.Hit.p | |
1088 | local ToMouse = (MousePosition - Head.Position).unit | |
1089 | local Angle = math.acos(ToMouse:Dot(Vector3.new(0, 1, 0))) | |
1090 | local FromRightArmPos = (Head.Position + Head.CFrame:vectorToWorldSpace(Vector3.new(((Head.Size.X / 2) + (RightArm.Size.X / 2)), ((Head.Size.Y / 2) - (RightArm.Size.Z / 2)), 0))) | |
1091 | local ToMouseRightArm = ((MousePosition - FromRightArmPos) * Vector3.new(1 ,0, 1)).unit | |
1092 | local Look = (Head.CFrame.lookVector * Vector3.new(1, 0, 1)).unit | |
1093 | local LateralAngle = math.acos(ToMouseRightArm:Dot(Look)) | |
1094 | if tostring(LateralAngle) == "-1.#IND" then | |
1095 | LateralAngle = 0 | |
1096 | end | |
1097 | local Cross = Head.CFrame.lookVector:Cross(ToMouseRightArm) | |
1098 | if LateralAngle > (math.pi / 2) then | |
1099 | LateralAngle = (math.pi / 2) | |
1100 | local Torso = root | |
1101 | local Point = Torso.CFrame:vectorToObjectSpace(mouse.Hit.p-Torso.CFrame.p) | |
1102 | if Point.Z > 0 then | |
1103 | if Point.X > -0 and RightArm == rarm then | |
1104 | Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mouse.Hit.X,Torso.Position.Y,mouse.Hit.Z))*CFrame.Angles(0,math.rad(110),0) | |
1105 | elseif Point.X < 0 and RightArm == rarm then | |
1106 | Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mouse.Hit.X,Torso.Position.Y,mouse.Hit.Z))*CFrame.Angles(0,math.rad(-110),0) | |
1107 | end | |
1108 | end | |
1109 | end | |
1110 | if Cross.Y < 0 then | |
1111 | LateralAngle = -LateralAngle | |
1112 | end | |
1113 | return(CFrame.Angles(((math.pi / 2) - Angle), ((math.pi / 2) + LateralAngle), math.pi/2)) | |
1114 | end | |
1115 | ||
1116 | --// Sound \\-- | |
1117 | ||
1118 | function sound(id,position,vol,pitch,start,finish) | |
1119 | coroutine.resume(coroutine.create(function() | |
1120 | ||
1121 | local part = Instance.new("Part",workspace) | |
1122 | part.Position = position | |
1123 | part.Size = Vector3.new(0,0,0) | |
1124 | part.CanCollide = false | |
1125 | part.Transparency = 1 | |
1126 | ||
1127 | local sound = Instance.new("Sound",part) | |
1128 | ||
1129 | sound.SoundId = "rbxassetid://"..id | |
1130 | ||
1131 | repeat rs:wait() until sound.IsLoaded | |
1132 | ||
1133 | if vol ~= nil then | |
1134 | sound.Volume = vol | |
1135 | end | |
1136 | ||
1137 | if pitch ~= nil then | |
1138 | sound.PlaybackSpeed = pitch | |
1139 | end | |
1140 | ||
1141 | if start ~= nil then | |
1142 | sound.TimePosition = start | |
1143 | end | |
1144 | ||
1145 | if finish ~= nil then | |
1146 | debris:AddItem(part,finish-start) | |
1147 | else | |
1148 | debris:AddItem(part,sound.TimeLength) | |
1149 | end | |
1150 | ||
1151 | sound:Play() | |
1152 | ||
1153 | return sound | |
1154 | ||
1155 | end)) | |
1156 | end | |
1157 | ||
1158 | --// Computedirection \\-- | |
1159 | ||
1160 | function computeDirection(vec) | |
1161 | local lenSquared = vec.magnitude * vec.magnitude | |
1162 | local invSqrt = 1 / math.sqrt(lenSquared) | |
1163 | return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt) | |
1164 | end | |
1165 | ||
1166 | --// Shake \\-- | |
1167 | ||
1168 | local shaking = 0 | |
1169 | function shake(num) if num > shaking then shaking = num end end | |
1170 | game:GetService("RunService").RenderStepped:connect(function() | |
1171 | hum.CameraOffset = Vector3.new(math.random(-1,1),math.random(-1,1),math.random(-1,1))*(shaking/100) | |
1172 | if shaking > 0 then shaking = shaking - 1 else shaking = 0 end | |
1173 | end) | |
1174 | ||
1175 | plr = game:GetService("Players").LocalPlayer | |
1176 | DebrisModel = Instance.new("Model",plr.Character) | |
1177 | DebrisModel.Name = "DebrisModel" | |
1178 | ||
1179 | function Effect(mesh,size,transparency,material,color,position,rotation,sizechange,rotationchange,transparencychange,acceleration) | |
1180 | ||
1181 | local part = Instance.new("Part",DebrisModel) | |
1182 | part.Anchored = true | |
1183 | part.CanCollide = false | |
1184 | part.Size = Vector3.new(1,1,1) | |
1185 | part.Transparency = transparency | |
1186 | part.Material = material | |
1187 | part.Color = color | |
1188 | part.CFrame = CFrame.new(position)*CFrame.Angles(math.rad(rotation.X),math.rad(rotation.Y),math.rad(rotation.Z)) | |
1189 | ||
1190 | local partmesh = Instance.new("SpecialMesh",part) | |
1191 | if tonumber(mesh) == nil then partmesh.MeshType = mesh else partmesh.MeshId = "rbxassetid://"..mesh end | |
1192 | partmesh.Scale = size | |
1193 | ||
1194 | local pvalue = Instance.new("Vector3Value",part) | |
1195 | pvalue.Name = "Position" | |
1196 | pvalue.Value = part.Position | |
1197 | ||
1198 | local svalue = Instance.new("Vector3Value",part) | |
1199 | svalue.Name = "Size" | |
1200 | svalue.Value = sizechange | |
1201 | ||
1202 | local rvalue = Instance.new("Vector3Value",part) | |
1203 | rvalue.Name = "Rotation" | |
1204 | rvalue.Value = rotationchange | |
1205 | ||
1206 | local tvalue = Instance.new("NumberValue",part) | |
1207 | tvalue.Name = "Transparency" | |
1208 | tvalue.Value = transparencychange | |
1209 | ||
1210 | local avalue = Instance.new("NumberValue",part) | |
1211 | avalue.Name = "Acceleration" | |
1212 | avalue.Value = acceleration | |
1213 | ||
1214 | part.Name = "EFFECT" | |
1215 | ||
1216 | return part | |
1217 | ||
1218 | end | |
1219 | ||
1220 | game:GetService("RunService").RenderStepped:connect(function() | |
1221 | ||
1222 | ||
1223 | if not plr.Character:FindFirstChild("DebrisModel") then | |
1224 | DebrisModel = Instance.new("Model",plr.Character) | |
1225 | DebrisModel.Name = "DebrisModel" | |
1226 | end | |
1227 | ||
1228 | for i,v in pairs(DebrisModel:GetChildren()) do | |
1229 | if v:IsA("BasePart") and v.Name == "EFFECT" then | |
1230 | local pvalue = v:FindFirstChild("Position").Value | |
1231 | local svalue = v:FindFirstChild("Size").Value | |
1232 | local rvalue = v:FindFirstChild("Rotation").Value | |
1233 | local tvalue = v:FindFirstChild("Transparency").Value | |
1234 | local avalue = v:FindFirstChild("Acceleration").Value | |
1235 | local mesh = v:FindFirstChild("Mesh") | |
1236 | mesh.Scale = mesh.Scale + svalue | |
1237 | v:FindFirstChild("Size").Value = v:FindFirstChild("Size").Value + (Vector3.new(1,1,1)*avalue) | |
1238 | v.Transparency = v.Transparency + tvalue | |
1239 | v.CFrame = v.CFrame*CFrame.Angles(math.rad(rvalue.X),math.rad(rvalue.Y),math.rad(rvalue.Z)) | |
1240 | if v.Transparency >= 1 or mesh.Scale.X < 0 or mesh.Scale.Y < 0 or mesh.Scale.Z < 0 then | |
1241 | v:Destroy() | |
1242 | end | |
1243 | end | |
1244 | end | |
1245 | ||
1246 | ||
1247 | end) | |
1248 | ||
1249 | --// Main 2# \\-- | |
1250 | ||
1251 | player = game.Players.LocalPlayer | |
1252 | chara = player.Character | |
1253 | plr = game.Players.LocalPlayer | |
1254 | char = plr.Character | |
1255 | mouse = plr:GetMouse() | |
1256 | whitecolor = Color3.new(1,1,1) | |
1257 | mouse = game.Players.LocalPlayer:GetMouse() | |
1258 | player = game.Players.LocalPlayer | |
1259 | local ColorArray = {ColorSequenceKeypoint.new(0, Color3.new(0/0,0/255,0/255)),ColorSequenceKeypoint.new(1, Color3.new(0/0,0/0,0/0))} | |
1260 | local Player = game.Players.LocalPlayer | |
1261 | local Character = Player.Character | |
1262 | local torso = Character.Torso | |
1263 | local hed = Character.Head | |
1264 | local p = game.Players.LocalPlayer | |
1265 | local char = p.Character | |
1266 | ||
1267 | --// Short keys \\-- | |
1268 | ||
1269 | RArm = Character["Right Arm"] | |
1270 | LArm = Character["Left Arm"] | |
1271 | RLeg = Character["Right Leg"] | |
1272 | LLeg = Character["Left Leg"] | |
1273 | ||
1274 | --// Clothes \\-- | |
1275 | ||
1276 | ||
1277 | hed.face.Texture = "http://www.roblox.com/asset/?id=1471407701" | |
1278 | ||
1279 | ||
1280 | --// Chat \\-- | |
1281 | ||
1282 | local talksound = Instance.new("Sound",char.Torso) | |
1283 | talksound.SoundId = "rbxassetid://455601633"talksound.Volume = 1 | |
1284 | function swait(num) | |
1285 | if num==0 or num==nil then | |
1286 | game:service'RunService'.Stepped:wait(0) | |
1287 | else | |
1288 | for i=0,num do | |
1289 | game:service'RunService'.Stepped:wait(0) | |
1290 | end | |
1291 | end | |
1292 | end | |
1293 | ||
1294 | function chatfunc(text) | |
1295 | local chat = coroutine.wrap(function() | |
1296 | if char:FindFirstChild("TalkingBillBoard") ~= nil then | |
1297 | char:FindFirstChild("TalkingBillBoard"):Destroy() | |
1298 | end | |
1299 | local naeeym2 = Instance.new("BillboardGui",char) | |
1300 | naeeym2.Size = UDim2.new(0,100,0,40) | |
1301 | naeeym2.StudsOffset = Vector3.new(0,3,0) | |
1302 | naeeym2.Adornee = char.Head | |
1303 | naeeym2.Name = "TalkingBillBoard" | |
1304 | local tecks2 = Instance.new("TextLabel",naeeym2) | |
1305 | tecks2.BackgroundTransparency = 1 | |
1306 | tecks2.BorderSizePixel = 0 | |
1307 | tecks2.Text = "" | |
1308 | tecks2.Font = "Fantasy" | |
1309 | tecks2.TextSize = 30 | |
1310 | tecks2.TextStrokeTransparency = 0 | |
1311 | tecks2.TextColor3 = Color3.new(200,0,0) | |
1312 | tecks2.TextStrokeColor3 = Color3.new(0,0,0) | |
1313 | tecks2.Size = UDim2.new(1,0,0.5,0) | |
1314 | local tecks3 = Instance.new("TextLabel",naeeym2) | |
1315 | tecks3.BackgroundTransparency = 1 | |
1316 | tecks3.BorderSizePixel = 0 | |
1317 | tecks3.Text = "" | |
1318 | tecks3.Font = "Fantasy" | |
1319 | tecks3.TextSize = 30 | |
1320 | tecks3.TextStrokeTransparency = 0 | |
1321 | tecks3.TextColor3 = Color3.new(200,0,0) | |
1322 | tecks3.TextStrokeColor3 = Color3.new(0,0,0) | |
1323 | tecks3.Size = UDim2.new(1,0,0.5,0) | |
1324 | for i = 1,string.len(text),1 do | |
1325 | tecks2.Text = string.sub(text,1,i) | |
1326 | tecks3.Text = string.sub(text,1,i) | |
1327 | talksound:Play() | |
1328 | wait(0.01) | |
1329 | end | |
1330 | wait(2) | |
1331 | for i = 1, 50 do | |
1332 | swait() | |
1333 | tecks2.Position = tecks2.Position - UDim2.new(math.random(-.4,.4),math.random(-5,5),.05,math.random(-5,5)) | |
1334 | tecks2.Rotation = tecks2.Rotation - .8 | |
1335 | tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04 | |
1336 | tecks2.TextTransparency = tecks2.TextTransparency + .04 | |
1337 | tecks3.Position = tecks2.Position - UDim2.new(math.random(-.4,.4),math.random(-5,5),.05,math.random(-5,5)) | |
1338 | tecks3.Rotation = tecks2.Rotation + .8 | |
1339 | tecks3.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04 | |
1340 | tecks3.TextTransparency = tecks2.TextTransparency + .04 | |
1341 | end | |
1342 | naeeym2:Destroy() | |
1343 | end) | |
1344 | chat() | |
1345 | end | |
1346 | function onChatted(msg) | |
1347 | chatfunc(msg) | |
1348 | end | |
1349 | ||
1350 | --// Head func \\-- | |
1351 | ||
1352 | New = function(Object, Parent, Name, Data) | |
1353 | local Object = Instance.new(Object) | |
1354 | for Index, Value in pairs(Data or {}) do | |
1355 | Object[Index] = Value | |
1356 | end | |
1357 | Object.Parent = Parent | |
1358 | Object.Name = Name | |
1359 | return Object | |
1360 | end | |
1361 | ||
1362 | ||
1363 | FakeHead = New("Model",chara,"FakeHead",{}) | |
1364 | MainPart = New("Part",FakeHead,"MainPart",{BrickColor = BrickColor.new("Institutional white"),Transparency = 1,Size = Vector3.new(2, 1, 1),CFrame = CFrame.new(18, 4.50000381, -6.5, -1, 0, 0, 0, 1, 0, 0, 0, -1),CanCollide = false,Color = Color3.new(0.972549, 0.972549, 0.972549),}) | |
1365 | Mesh = New("SpecialMesh",MainPart,"Mesh",{Scale = Vector3.new(1.25, 1.25, 1.25),}) | |
1366 | Decal = New("Decal",MainPart,"Decal",{Texture = "http://www.roblox.com/asset/?id=0",}) | |
1367 | Weld = New("ManualWeld",MainPart,"Weld",{Part0 = MainPart,Part1 = chara.Head,C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0, -1),C1 = CFrame.new(0, 3.81469727e-006, 0, -1, 0, 0, 0, 1, 0, 0, 0, -1),}) | |
1368 | OutfitPart = New("Part",FakeHead,"OutfitPart",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(2, 0.399999976, 1),CFrame = CFrame.new(18, 4.80000114, -6.5, -1, 0, 0, 0, 1, 0, 0, 0, -1),CanCollide = false,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),}) | |
1369 | Mesh = New("CylinderMesh",OutfitPart,"Mesh",{Scale = Vector3.new(1.25999999, 1, 1.25999999),}) | |
1370 | Weld = New("ManualWeld",OutfitPart,"Weld",{Part0 = OutfitPart,Part1 = MainPart,C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0, -1),C1 = CFrame.new(0, 0.29999733, 0, -1, 0, 0, 0, 1, 0, 0, 0, -1),}) | |
1371 | OutfitPart = New("Part",FakeHead,"OutfitPart",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Transparency = 0.5,Transparency = 0.5,Size = Vector3.new(2, 0.399999976, 1),CFrame = CFrame.new(18, 4.79999971, -6.5, -1, 0, 0, 0, 1, 0, 0, 0, -1),CanCollide = false,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),}) | |
1372 | Mesh = New("CylinderMesh",OutfitPart,"Mesh",{Scale = Vector3.new(1.25, 1.5, 1.25),}) | |
1373 | Weld = New("ManualWeld",OutfitPart,"Weld",{Part0 = OutfitPart,Part1 = MainPart,C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0, -1),C1 = CFrame.new(0, 0.299995899, 0, -1, 0, 0, 0, 1, 0, 0, 0, -1),}) | |
1374 | OutfitPart = New("Part",FakeHead,"OutfitPart",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Transparency = 0.25,Transparency = 0.25,Size = Vector3.new(2, 0.399999976, 1),CFrame = CFrame.new(18, 4.79999924, -6.5, -1, 0, 0, 0, 1, 0, 0, 0, -1),CanCollide = false,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),}) | |
1375 | Mesh = New("CylinderMesh",OutfitPart,"Mesh",{Scale = Vector3.new(1.25, 1.25, 1.25),}) | |
1376 | Weld = New("ManualWeld",OutfitPart,"Weld",{Part0 = OutfitPart,Part1 = MainPart,C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0, -1),C1 = CFrame.new(0, 0.299995422, 0, -1, 0, 0, 0, 1, 0, 0, 0, -1),}) | |
1377 | ||
1378 | ||
1379 | ||
1380 | ||
1381 | --// Another attacks \\-- | |
1382 | ||
1383 | local root = char.HumanoidRootPart | |
1384 | function teleport(key) | |
1385 | key = key:lower() | |
1386 | if key == "f" and not teleportlimit then | |
1387 | slashsoundglobal:Play() | |
1388 | teleportlimit = true | |
1389 | root.CFrame = CFrame.new(CFrame.new(mouse.Hit.p)*CFrame.new(0,2.8,0).p,root.Position) | |
1390 | wait(5) | |
1391 | wait(0) | |
1392 | teleportlimit = false | |
1393 | end | |
1394 | end | |
1395 | mouse.KeyDown:connect(teleport) | |
1396 | ||
1397 | local root = char.HumanoidRootPart | |
1398 | function laugh(key) | |
1399 | key = key:lower() | |
1400 | if key == "t" then | |
1401 | slashsound3:Play() | |
1402 | end | |
1403 | end | |
1404 | mouse.KeyDown:connect(laugh) | |
1405 | ||
1406 | ||
1407 | ||
1408 | local root = char.HumanoidRootPart | |
1409 | function haha(key) | |
1410 | key = key:lower() | |
1411 | if key == "y" then | |
1412 | slashsound4:Play() | |
1413 | end | |
1414 | end | |
1415 | mouse.KeyDown:connect(haha) | |
1416 | ||
1417 | ||
1418 | ||
1419 | function musicoff(key) | |
1420 | key = key:lower() | |
1421 | if key == "l" then | |
1422 | slashsound1:Stop() | |
1423 | end | |
1424 | end | |
1425 | mouse.KeyDown:connect(musicoff) | |
1426 | ||
1427 | function musicon(key) | |
1428 | key = key:lower() | |
1429 | if key == "k" then | |
1430 | slashsound1:Play() | |
1431 | end | |
1432 | end | |
1433 | mouse.KeyDown:connect(musicon) | |
1434 | ||
1435 | ||
1436 | ||
1437 | ||
1438 | ||
1439 | ||
1440 | --// Smoke and Body functions \\-- | |
1441 | ||
1442 | music(0) | |
1443 | equalizer = Instance.new("EqualizerSoundEffect",torso:FindFirstChild("MusicRuin")) | |
1444 | ||
1445 | local size = 1 | |
1446 | ||
1447 | newWeld(torso, larm, -1.5*size, 0.5*size, 0) | |
1448 | larm.Weld.C1 = CFrame.new(0, 0.5*size, 0) | |
1449 | newWeld(torso, rarm, 1.5*size, 0.5*size, 0) | |
1450 | rarm.Weld.C1 = CFrame.new(0, 0.5*size, 0) | |
1451 | newWeld(torso, hed, 0, 1.5*size, 0) | |
1452 | newWeld(torso, lleg, -0.5*size, -1, 0) | |
1453 | lleg.Weld.C1 = CFrame.new(0, 1*size, 0) | |
1454 | newWeld(torso, rleg, 0.5*size, -1*size, 0) | |
1455 | rleg.Weld.C1 = CFrame.new(0, 1*size, 0) | |
1456 | newWeld(root, torso, 0, -1*size, 0) | |
1457 | torso.Weld.C1 = CFrame.new(0, -1*size, 0) | |
1458 | ||
1459 | --// Knife \\-- | |
1460 | ||
1461 | HitBox = Instance.new("Part",DebrisModel) | |
1462 | HitBox.Size = Vector3.new(0.5,0.5,2.45) | |
1463 | HitBox.CanCollide = false | |
1464 | HitBox:BreakJoints() | |
1465 | HitBox.Transparency = 1 | |
1466 | newWeld(rarm,HitBox,-0.1,-0.95,-1.2) | |
1467 | atch0 = Instance.new("Attachment",HitBox) | |
1468 | atch0.Position = Vector3.new(0,0,HitBox.Size.Z/2) | |
1469 | atch1 = Instance.new("Attachment",HitBox) | |
1470 | atch1.Position = Vector3.new(0,0,-HitBox.Size.Z/2) | |
1471 | trail = Instance.new("Trail",HitBox) | |
1472 | trail.Attachment0 = atch0 | |
1473 | trail.Attachment1 = atch1 | |
1474 | trail.Lifetime = 0.25 | |
1475 | trail.Enabled = true | |
1476 | trail.LightEmission = 1 | |
1477 | trail.LightInfluence = 0 | |
1478 | trail.Color = ColorSequence.new(Color3.new(1,0,0)) | |
1479 | trail.Transparency = NumberSequence.new(0,1) | |
1480 | ||
1481 | ||
1482 | ||
1483 | ||
1484 | ||
1485 | ||
1486 | function ded(model) | |
1487 | kills = kills + 0 | |
1488 | model.Archivable = true | |
1489 | model.Head:ClearAllChildren() | |
1490 | local clone = model:Clone() | |
1491 | clone.Parent = workspace | |
1492 | clone.Name = "DED" | |
1493 | model:Destroy() | |
1494 | clone:FindFirstChildOfClass("Humanoid"):Destroy() | |
1495 | local emitters={} | |
1496 | for i,v in pairs(clone:GetChildren()) do | |
1497 | if v:IsA("Accoutrement") then | |
1498 | v:Destroy() | |
1499 | end | |
1500 | if v:IsA("Part") then | |
1501 | v.Anchored = true | |
1502 | v.CanCollide = false | |
1503 | v.Transparency = 0.7 | |
1504 | v.BrickColor = BrickColor.new'Really red' | |
1505 | local emitter = Instance.new("ParticleEmitter",v) | |
1506 | emitter.LightEmission = 1 | |
1507 | emitter.Transparency = NumberSequence.new(0,1) | |
1508 | emitter.Size = NumberSequence.new(0,0.5) | |
1509 | emitter.SpreadAngle = Vector2.new(360,360) | |
1510 | emitter.Speed = NumberRange.new(0.5) | |
1511 | emitter.Lifetime = NumberRange.new(0.75) | |
1512 | emitter.Texture = "rbxassetid://771221224" | |
1513 | emitter.Rate = 300 | |
1514 | emitter.Color = ColorSequence.new(Color3.new(255,0,0)) | |
1515 | emitter.LockedToPart = false | |
1516 | table.insert(emitters,emitter) | |
1517 | end | |
1518 | end | |
1519 | delay(1, function() | |
1520 | sound(337800380,clone.Torso.Position,10,1) | |
1521 | for i,v in pairs(emitters) do | |
1522 | v.Speed = NumberRange.new(4) | |
1523 | v.Acceleration = Vector3.new(0,10,0) | |
1524 | delay(0.5, function() | |
1525 | v.Enabled = false | |
1526 | debris:AddItem(clone,0.75) | |
1527 | end) | |
1528 | end | |
1529 | end) | |
1530 | end | |
1531 | ||
1532 | local alreadytouched = {} | |
1533 | HitBox.Touched:connect(function(ht) | |
1534 | coroutine.resume(coroutine.create(function() | |
1535 | local hit = ht.Parent | |
1536 | if mode == "determination" and hit.Name ~= "DED" and attacking == true and checkIfNotPlayer(ht) and hit:FindFirstChildOfClass("Humanoid") and hit:FindFirstChildOfClass("Humanoid").Health > 0 then | |
1537 | local hurt = true | |
1538 | for i,v in pairs(alreadytouched) do if v == hit then hurt = false end end | |
1539 | if hurt == true then | |
1540 | table.insert(alreadytouched,hit) | |
1541 | sound(337800380,ht.Position,10,1) | |
1542 | ded(hit) | |
1543 | end | |
1544 | end | |
1545 | end)) | |
1546 | end) | |
1547 | ||
1548 | function createknife() | |
1549 | Model0 = Instance.new("Model") | |
1550 | Part1 = Instance.new("Part") | |
1551 | BlockMesh2 = Instance.new("BlockMesh") | |
1552 | Part3 = Instance.new("Part") | |
1553 | BlockMesh4 = Instance.new("BlockMesh") | |
1554 | Part5 = Instance.new("Part") | |
1555 | Part6 = Instance.new("Part") | |
1556 | BlockMesh7 = Instance.new("BlockMesh") | |
1557 | Part8 = Instance.new("Part") | |
1558 | Part9 = Instance.new("Part") | |
1559 | Part10 = Instance.new("Part") | |
1560 | SpecialMesh11 = Instance.new("SpecialMesh") | |
1561 | Part12 = Instance.new("Part") | |
1562 | Model0.Parent = char | |
1563 | Part1.Parent = Model0 | |
1564 | Part1.Anchored = true | |
1565 | Part1.CanCollide = false | |
1566 | Part1.Size = Vector3.new(0.280000031, 0.0500000007, 0.0500000007) | |
1567 | Part1.CFrame = CFrame.new(49.5, 20.7350044, 52.3199997, 0.99999994, 0, 0, 0, 1, -5.56362707e-08, 0, 5.56362707e-08, 1) | |
1568 | Part1.BottomSurface = Enum.SurfaceType.Smooth | |
1569 | Part1.TopSurface = Enum.SurfaceType.Smooth | |
1570 | Part1.Position = Vector3.new(49.5, 20.7350044, 52.3199997) | |
1571 | Part1.Color = Color3.new(0.972549, 0.972549, 0.972549) | |
1572 | BlockMesh2.Parent = Part1 | |
1573 | BlockMesh2.Scale = Vector3.new(1, 0.399999797, 0.400000781) | |
1574 | BlockMesh2.Scale = Vector3.new(1, 0.399999797, 0.400000781) | |
1575 | Part3.Parent = Model0 | |
1576 | Part3.Anchored = true | |
1577 | Part3.CanCollide = false | |
1578 | Part3.Size = Vector3.new(0.220000014, 0.0500000007, 0.0500000007) | |
1579 | Part3.CFrame = CFrame.new(49.5, 20.6250038, 53.6199989, 0.99999994, 0, 0, 0, 1, -5.56362707e-08, 0, 5.56362707e-08, 1) | |
1580 | Part3.BottomSurface = Enum.SurfaceType.Smooth | |
1581 | Part3.TopSurface = Enum.SurfaceType.Smooth | |
1582 | Part3.Position = Vector3.new(49.5, 20.6250038, 53.6199989) | |
1583 | Part3.Color = Color3.new(0.972549, 0.972549, 0.972549) | |
1584 | BlockMesh4.Parent = Part3 | |
1585 | BlockMesh4.Scale = Vector3.new(1, 0.399999797, 0.400000781) | |
1586 | BlockMesh4.Scale = Vector3.new(1, 0.399999797, 0.400000781) | |
1587 | Part5.Parent = Model0 | |
1588 | Part5.Anchored = true | |
1589 | Part5.CanCollide = false | |
1590 | Part5.Size = Vector3.new(0.159999996, 0.400000006, 1.70000005) | |
1591 | Part5.CFrame = CFrame.new(49.5, 20.5750046, 51.4300003, 0.99999994, 0, 0, 0, 1, -5.56362707e-08, 0, 5.56362707e-08, 1) | |
1592 | Part5.BottomSurface = Enum.SurfaceType.Smooth | |
1593 | Part5.TopSurface = Enum.SurfaceType.Smooth | |
1594 | Part5.Position = Vector3.new(49.5, 20.5750046, 51.4300003) | |
1595 | Part5.Color = Color3.new(1, 0, 0) | |
1596 | Part6.Parent = Model0 | |
1597 | Part6.Anchored = true | |
1598 | Part6.CanCollide = false | |
1599 | Part6.Size = Vector3.new(0.280000031, 0.0500000007, 0.0500000007) | |
1600 | Part6.CFrame = CFrame.new(49.5, 20.4150047, 52.3199997, 0.99999994, 0, 0, 0, 1, -5.56362707e-08, 0, 5.56362707e-08, 1) | |
1601 | Part6.BottomSurface = Enum.SurfaceType.Smooth | |
1602 | Part6.TopSurface = Enum.SurfaceType.Smooth | |
1603 | Part6.Position = Vector3.new(49.5, 20.4150047, 52.3199997) | |
1604 | Part6.Color = Color3.new(0.972549, 0.972549, 0.972549) | |
1605 | BlockMesh7.Parent = Part6 | |
1606 | BlockMesh7.Scale = Vector3.new(1, 0.399999797, 0.400000781) | |
1607 | BlockMesh7.Scale = Vector3.new(1, 0.399999797, 0.400000781) | |
1608 | Part8.Name = "asd" | |
1609 | Part8.Parent = Model0 | |
1610 | Part8.Anchored = true | |
1611 | Part8.CanCollide = false | |
1612 | Part8.Size = Vector3.new(0.200000003, 0.200000003, 1.30000007) | |
1613 | Part8.CFrame = CFrame.new(49.5, 20.6250038, 52.9300003, 0.99999994, 0, 0, 0, 1, -5.56362707e-08, 0, 5.56362707e-08, 1) | |
1614 | Part8.BottomSurface = Enum.SurfaceType.Smooth | |
1615 | Part8.TopSurface = Enum.SurfaceType.Smooth | |
1616 | Part8.Position = Vector3.new(49.5, 20.6250038, 52.9300003) | |
1617 | Part8.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
1618 | Part9.Parent = Model0 | |
1619 | Part9.Anchored = true | |
1620 | Part9.CanCollide = false | |
1621 | Part9.Size = Vector3.new(0.200000003, 0.25999999, 0.100000039) | |
1622 | Part9.CFrame = CFrame.new(49.5, 20.595005, 53.6199989, 0.99999994, 0, 0, 0, 1, -5.56362707e-08, 0, 5.56362707e-08, 1) | |
1623 | Part9.BottomSurface = Enum.SurfaceType.Smooth | |
1624 | Part9.TopSurface = Enum.SurfaceType.Smooth | |
1625 | Part9.Position = Vector3.new(49.5, 20.595005, 53.6199989) | |
1626 | Part9.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
1627 | Part10.Parent = Model0 | |
1628 | Part10.Rotation = Vector3.new(0, 0, 180) | |
1629 | Part10.Anchored = true | |
1630 | Part10.CanCollide = false | |
1631 | Part10.Size = Vector3.new(0.159999996, 0.400000006, 0.800000012) | |
1632 | 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) | |
1633 | Part10.BottomSurface = Enum.SurfaceType.Smooth | |
1634 | Part10.TopSurface = Enum.SurfaceType.Smooth | |
1635 | Part10.Position = Vector3.new(49.5, 20.5750046, 50.1800003) | |
1636 | Part10.Color = Color3.new(1, 0, 0) | |
1637 | SpecialMesh11.Parent = Part10 | |
1638 | SpecialMesh11.MeshType = Enum.MeshType.Wedge | |
1639 | Part12.Parent = Model0 | |
1640 | Part12.Anchored = true | |
1641 | Part12.CanCollide = false | |
1642 | Part12.Size = Vector3.new(0.25999999, 0.460000008, 0.100000039) | |
1643 | Part12.CFrame = CFrame.new(49.5, 20.5750046, 52.3199997, 0.99999994, 0, 0, 0, 1, -5.56362707e-08, 0, 5.56362707e-08, 1) | |
1644 | Part12.BottomSurface = Enum.SurfaceType.Smooth | |
1645 | Part12.TopSurface = Enum.SurfaceType.Smooth | |
1646 | Part12.Position = Vector3.new(49.5, 20.5750046, 52.3199997) | |
1647 | Part12.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
1648 | weld(Model0) | |
1649 | for i,v in pairs(Model0:GetChildren()) do | |
1650 | if v:IsA("Part") and v.Color == Color3.new(1,0,0) then | |
1651 | v.Material = Enum.Material.Neon | |
1652 | end | |
1653 | end | |
1654 | return Model0 | |
1655 | end | |
1656 | ||
1657 | knife = createknife() | |
1658 | newWeld(rarm,knife.asd,0,-1,0) | |
1659 | ||
1660 | --// Pistol \\-- | |
1661 | ||
1662 | function createpistol() | |
1663 | Model0 = Instance.new("Model") | |
1664 | Part1 = Instance.new("Part") | |
1665 | BlockMesh2 = Instance.new("BlockMesh") | |
1666 | Part3 = Instance.new("Part") | |
1667 | Part4 = Instance.new("Part") | |
1668 | Part5 = Instance.new("Part") | |
1669 | Part6 = Instance.new("Part") | |
1670 | Part7 = Instance.new("Part") | |
1671 | Part8 = Instance.new("Part") | |
1672 | Part9 = Instance.new("Part") | |
1673 | Part10 = Instance.new("Part") | |
1674 | Part11 = Instance.new("Part") | |
1675 | Part12 = Instance.new("Part") | |
1676 | Part13 = Instance.new("Part") | |
1677 | Part14 = Instance.new("Part") | |
1678 | Part15 = Instance.new("Part") | |
1679 | Part16 = Instance.new("Part") | |
1680 | Part17 = Instance.new("Part") | |
1681 | Part18 = Instance.new("Part") | |
1682 | Part19 = Instance.new("Part") | |
1683 | Model0.Name = "Pistol" | |
1684 | Model0.Parent = char | |
1685 | Part1.Name = "ShootPos" | |
1686 | Part1.Parent = Model0 | |
1687 | Part1.BrickColor = BrickColor.new("Really black") | |
1688 | Part1.Anchored = true | |
1689 | Part1.CanCollide = false | |
1690 | Part1.Size = Vector3.new(0.100000001, 0.100000001, 0.0500000007) | |
1691 | Part1.CFrame = CFrame.new(-90, 10.5000019, 13.8957434, 1, 0, 0, 0, 1, -2.08616257e-07, 0, 2.08616257e-07, 1) | |
1692 | Part1.BottomSurface = Enum.SurfaceType.Smooth | |
1693 | Part1.TopSurface = Enum.SurfaceType.Smooth | |
1694 | Part1.Color = Color3.new(0.0666667, 0.0666667, 0.0666667) | |
1695 | Part1.Position = Vector3.new(-90, 10.5000019, 13.8957434) | |
1696 | Part1.Color = Color3.new(0.0666667, 0.0666667, 0.0666667) | |
1697 | BlockMesh2.Parent = Part1 | |
1698 | BlockMesh2.Scale = Vector3.new(1, 1, 0.199999988) | |
1699 | BlockMesh2.Scale = Vector3.new(1, 1, 0.199999988) | |
1700 | Part3.Parent = Model0 | |
1701 | Part3.BrickColor = BrickColor.new("Pearl") | |
1702 | Part3.Anchored = true | |
1703 | Part3.CanCollide = false | |
1704 | Part3.Size = Vector3.new(0.100000001, 0.550000012, 0.0500000007) | |
1705 | Part3.CFrame = CFrame.new(-90.0999985, 10.3750019, 13.8757429, 1, 0, 0, 0, 1, -2.08616257e-07, 0, 2.08616257e-07, 1) | |
1706 | Part3.BottomSurface = Enum.SurfaceType.Smooth | |
1707 | Part3.TopSurface = Enum.SurfaceType.Smooth | |
1708 | Part3.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1709 | Part3.Position = Vector3.new(-90.0999985, 10.3750019, 13.8757429) | |
1710 | Part3.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1711 | Part4.Parent = Model0 | |
1712 | Part4.BrickColor = BrickColor.new("Pearl") | |
1713 | Part4.Anchored = true | |
1714 | Part4.CanCollide = false | |
1715 | Part4.Size = Vector3.new(0.300000012, 0.349999994, 0.0500000007) | |
1716 | Part4.CFrame = CFrame.new(-90, 10.2750025, 13.8757429, 1, 0, 0, 0, 1, -2.08616257e-07, 0, 2.08616257e-07, 1) | |
1717 | Part4.BottomSurface = Enum.SurfaceType.Smooth | |
1718 | Part4.TopSurface = Enum.SurfaceType.Smooth | |
1719 | Part4.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1720 | Part4.Position = Vector3.new(-90, 10.2750025, 13.8757429) | |
1721 | Part4.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1722 | Part5.Parent = Model0 | |
1723 | Part5.BrickColor = BrickColor.new("Pearl") | |
1724 | Part5.Rotation = Vector3.new(15, 0, 0) | |
1725 | Part5.Anchored = true | |
1726 | Part5.CanCollide = false | |
1727 | Part5.Size = Vector3.new(0.200000003, 0.25, 0.150000006) | |
1728 | Part5.CFrame = CFrame.new(-90, 10.4379425, 15.8274469, 1, 0, 0, 0, 0.965925753, -0.258819252, 0, 0.258819252, 0.965925753) | |
1729 | Part5.BottomSurface = Enum.SurfaceType.Smooth | |
1730 | Part5.TopSurface = Enum.SurfaceType.Smooth | |
1731 | Part5.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1732 | Part5.Position = Vector3.new(-90, 10.4379425, 15.8274469) | |
1733 | Part5.Orientation = Vector3.new(15, 0, 0) | |
1734 | Part5.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1735 | Part6.Parent = Model0 | |
1736 | Part6.BrickColor = BrickColor.new("Pearl") | |
1737 | Part6.Anchored = true | |
1738 | Part6.CanCollide = false | |
1739 | Part6.Size = Vector3.new(0.300000012, 0.550000012, 1.89999998) | |
1740 | Part6.CFrame = CFrame.new(-90, 10.3750019, 14.8507433, 1, 0, 0, 0, 1, -2.08616257e-07, 0, 2.08616257e-07, 1) | |
1741 | Part6.BottomSurface = Enum.SurfaceType.Smooth | |
1742 | Part6.TopSurface = Enum.SurfaceType.Smooth | |
1743 | Part6.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1744 | Part6.Position = Vector3.new(-90, 10.3750019, 14.8507433) | |
1745 | Part6.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1746 | Part7.Parent = Model0 | |
1747 | Part7.BrickColor = BrickColor.new("Pearl") | |
1748 | Part7.Anchored = true | |
1749 | Part7.CanCollide = false | |
1750 | Part7.Size = Vector3.new(0.100000001, 0.0500000007, 0.0500000007) | |
1751 | Part7.CFrame = CFrame.new(-90.0999985, 10.6750021, 15.6257429, 1, 0, 0, 0, 1, -2.08616257e-07, 0, 2.08616257e-07, 1) | |
1752 | Part7.BottomSurface = Enum.SurfaceType.Smooth | |
1753 | Part7.TopSurface = Enum.SurfaceType.Smooth | |
1754 | Part7.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1755 | Part7.Position = Vector3.new(-90.0999985, 10.6750021, 15.6257429) | |
1756 | Part7.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1757 | Part8.Parent = Model0 | |
1758 | Part8.BrickColor = BrickColor.new("Black") | |
1759 | Part8.Rotation = Vector3.new(-15, 0, 0) | |
1760 | Part8.Anchored = true | |
1761 | Part8.CanCollide = false | |
1762 | Part8.Size = Vector3.new(0.220000014, 0.5, 0.209999993) | |
1763 | Part8.CFrame = CFrame.new(-90, 9.71499538, 15.4898481, 1, 0, 0, 0, 0.965925872, 0.258818835, 0, -0.258818835, 0.965925872) | |
1764 | Part8.BottomSurface = Enum.SurfaceType.Smooth | |
1765 | Part8.TopSurface = Enum.SurfaceType.Smooth | |
1766 | Part8.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
1767 | Part8.Position = Vector3.new(-90, 9.71499538, 15.4898481) | |
1768 | Part8.Orientation = Vector3.new(-15, 0, 0) | |
1769 | Part8.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
1770 | Part9.Parent = Model0 | |
1771 | Part9.BrickColor = BrickColor.new("Pearl") | |
1772 | Part9.Anchored = true | |
1773 | Part9.CanCollide = false | |
1774 | Part9.Size = Vector3.new(0.100000001, 0.550000012, 0.0500000007) | |
1775 | Part9.CFrame = CFrame.new(-89.9000015, 10.3750019, 13.8757429, 1, 0, 0, 0, 1, -2.08616257e-07, 0, 2.08616257e-07, 1) | |
1776 | Part9.BottomSurface = Enum.SurfaceType.Smooth | |
1777 | Part9.TopSurface = Enum.SurfaceType.Smooth | |
1778 | Part9.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1779 | Part9.Position = Vector3.new(-89.9000015, 10.3750019, 13.8757429) | |
1780 | Part9.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1781 | Part10.Parent = Model0 | |
1782 | Part10.BrickColor = BrickColor.new("Pearl") | |
1783 | Part10.Anchored = true | |
1784 | Part10.CanCollide = false | |
1785 | Part10.Size = Vector3.new(0.100000001, 0.0500000007, 0.0500000007) | |
1786 | Part10.CFrame = CFrame.new(-89.9000015, 10.6750021, 15.6257429, 1, 0, 0, 0, 1, -2.08616257e-07, 0, 2.08616257e-07, 1) | |
1787 | Part10.BottomSurface = Enum.SurfaceType.Smooth | |
1788 | Part10.TopSurface = Enum.SurfaceType.Smooth | |
1789 | Part10.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1790 | Part10.Position = Vector3.new(-89.9000015, 10.6750021, 15.6257429) | |
1791 | Part10.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1792 | Part11.Parent = Model0 | |
1793 | Part11.BrickColor = BrickColor.new("Pearl") | |
1794 | Part11.Anchored = true | |
1795 | Part11.CanCollide = false | |
1796 | Part11.Size = Vector3.new(0.200000003, 0.150000006, 0.600000024) | |
1797 | Part11.CFrame = CFrame.new(-90, 9.37500191, 15.6007433, 1, 0, 0, 0, 1, -2.08616257e-07, 0, 2.08616257e-07, 1) | |
1798 | Part11.BottomSurface = Enum.SurfaceType.Smooth | |
1799 | Part11.TopSurface = Enum.SurfaceType.Smooth | |
1800 | Part11.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1801 | Part11.Position = Vector3.new(-90, 9.37500191, 15.6007433) | |
1802 | Part11.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1803 | Part12.Parent = Model0 | |
1804 | Part12.BrickColor = BrickColor.new("Pearl") | |
1805 | Part12.Rotation = Vector3.new(-30, 0, 0) | |
1806 | Part12.Anchored = true | |
1807 | Part12.CanCollide = false | |
1808 | Part12.Size = Vector3.new(0.100000001, 0.150000006, 0.0500000007) | |
1809 | Part12.CFrame = CFrame.new(-90, 9.97165203, 15.1132431, 1, 0, 0, 0, 0.866025448, 0.5, 0, -0.5, 0.866025448) | |
1810 | Part12.BottomSurface = Enum.SurfaceType.Smooth | |
1811 | Part12.TopSurface = Enum.SurfaceType.Smooth | |
1812 | Part12.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1813 | Part12.Position = Vector3.new(-90, 9.97165203, 15.1132431) | |
1814 | Part12.Orientation = Vector3.new(-30, 0, 0) | |
1815 | Part12.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1816 | Part13.Parent = Model0 | |
1817 | Part13.BrickColor = BrickColor.new("Pearl") | |
1818 | Part13.Anchored = true | |
1819 | Part13.CanCollide = false | |
1820 | Part13.Size = Vector3.new(0.300000012, 0.100000001, 0.0500000007) | |
1821 | Part13.CFrame = CFrame.new(-90, 10.6000023, 13.8757429, 1, 0, 0, 0, 1, -2.08616257e-07, 0, 2.08616257e-07, 1) | |
1822 | Part13.BottomSurface = Enum.SurfaceType.Smooth | |
1823 | Part13.TopSurface = Enum.SurfaceType.Smooth | |
1824 | Part13.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1825 | Part13.Position = Vector3.new(-90, 10.6000023, 13.8757429) | |
1826 | Part13.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1827 | Part14.Parent = Model0 | |
1828 | Part14.BrickColor = BrickColor.new("Pearl") | |
1829 | Part14.Rotation = Vector3.new(-30, 0, 0) | |
1830 | Part14.Anchored = true | |
1831 | Part14.CanCollide = false | |
1832 | Part14.Size = Vector3.new(0.200000003, 0.100000001, 0.25) | |
1833 | Part14.CFrame = CFrame.new(-90, 10.5216522, 15.9065447, 1, 0, 0, 0, 0.866025329, 0.49999997, 0, -0.49999997, 0.866025329) | |
1834 | Part14.BottomSurface = Enum.SurfaceType.Smooth | |
1835 | Part14.TopSurface = Enum.SurfaceType.Smooth | |
1836 | Part14.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1837 | Part14.Position = Vector3.new(-90, 10.5216522, 15.9065447) | |
1838 | Part14.Orientation = Vector3.new(-30, 0, 0) | |
1839 | Part14.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1840 | Part15.Parent = Model0 | |
1841 | Part15.BrickColor = BrickColor.new("White") | |
1842 | Part15.Rotation = Vector3.new(-105, 0, 0) | |
1843 | Part15.Anchored = true | |
1844 | Part15.CanCollide = false | |
1845 | Part15.Size = Vector3.new(0.100000001, 0.200000003, 0.0500000007) | |
1846 | Part15.CFrame = CFrame.new(-90, 9.92812252, 15.2373915, 1, 0, 0, 0, -0.258819371, 0.965925813, 0, -0.965925813, -0.258819371) | |
1847 | Part15.BottomSurface = Enum.SurfaceType.Smooth | |
1848 | Part15.TopSurface = Enum.SurfaceType.Smooth | |
1849 | Part15.Color = Color3.new(0.94902, 0.952941, 0.952941) | |
1850 | Part15.Position = Vector3.new(-90, 9.92812252, 15.2373915) | |
1851 | Part15.Orientation = Vector3.new(-75, 180, 180) | |
1852 | Part15.Color = Color3.new(0.94902, 0.952941, 0.952941) | |
1853 | Part16.Name = "asd" | |
1854 | Part16.Parent = Model0 | |
1855 | Part16.BrickColor = BrickColor.new("Pearl") | |
1856 | Part16.Rotation = Vector3.new(-15, 0, 0) | |
1857 | Part16.Anchored = true | |
1858 | Part16.CanCollide = false | |
1859 | Part16.Size = Vector3.new(0.200000003, 1.14999998, 0.400000006) | |
1860 | Part16.CFrame = CFrame.new(-90, 9.93709087, 15.5425692, 1, 0, 0, 0, 0.965925872, 0.258818835, 0, -0.258818835, 0.965925872) | |
1861 | Part16.BottomSurface = Enum.SurfaceType.Smooth | |
1862 | Part16.TopSurface = Enum.SurfaceType.Smooth | |
1863 | Part16.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1864 | Part16.Position = Vector3.new(-90, 9.93709087, 15.5425692) | |
1865 | Part16.Orientation = Vector3.new(-15, 0, 0) | |
1866 | Part16.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1867 | Part17.Parent = Model0 | |
1868 | Part17.BrickColor = BrickColor.new("Pearl") | |
1869 | Part17.Anchored = true | |
1870 | Part17.CanCollide = false | |
1871 | Part17.Size = Vector3.new(0.100000001, 0.100000001, 0.0500000007) | |
1872 | Part17.CFrame = CFrame.new(-90, 10.0500021, 15.0757437, 1, 0, 0, 0, 1, -2.08616257e-07, 0, 2.08616257e-07, 1) | |
1873 | Part17.BottomSurface = Enum.SurfaceType.Smooth | |
1874 | Part17.TopSurface = Enum.SurfaceType.Smooth | |
1875 | Part17.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1876 | Part17.Position = Vector3.new(-90, 10.0500021, 15.0757437) | |
1877 | Part17.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1878 | Part18.Parent = Model0 | |
1879 | Part18.BrickColor = BrickColor.new("Pearl") | |
1880 | Part18.Anchored = true | |
1881 | Part18.CanCollide = false | |
1882 | Part18.Size = Vector3.new(0.100000001, 0.0500000007, 0.0500000007) | |
1883 | Part18.CFrame = CFrame.new(-90, 10.6750021, 13.8757429, 1, 0, 0, 0, 1, -2.08616257e-07, 0, 2.08616257e-07, 1) | |
1884 | Part18.BottomSurface = Enum.SurfaceType.Smooth | |
1885 | Part18.TopSurface = Enum.SurfaceType.Smooth | |
1886 | Part18.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1887 | Part18.Position = Vector3.new(-90, 10.6750021, 13.8757429) | |
1888 | Part18.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1889 | Part19.Parent = Model0 | |
1890 | Part19.BrickColor = BrickColor.new("Pearl") | |
1891 | Part19.Anchored = true | |
1892 | Part19.CanCollide = false | |
1893 | Part19.Size = Vector3.new(0.400000006, 0.200000003, 1.05000007) | |
1894 | Part19.CFrame = CFrame.new(-90, 10.1500015, 14.4757433, 1, 0, 0, 0, 1, -2.08616257e-07, 0, 2.08616257e-07, 1) | |
1895 | Part19.BottomSurface = Enum.SurfaceType.Smooth | |
1896 | Part19.TopSurface = Enum.SurfaceType.Smooth | |
1897 | Part19.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1898 | Part19.Position = Vector3.new(-90, 10.1500015, 14.4757433) | |
1899 | Part19.Color = Color3.new(0.905882, 0.905882, 0.92549) | |
1900 | for i,v in pairs(Model0:GetChildren()) do | |
1901 | if v:IsA("Part") then | |
1902 | v.Color = Color3.new(1,1,0) | |
1903 | v.Material = Enum.Material.Neon | |
1904 | v.Transparency = 0 | |
1905 | v.CanCollide = false | |
1906 | end | |
1907 | end | |
1908 | weld(Model0) | |
1909 | return Model0 | |
1910 | end | |
1911 | ||
1912 | ||
1913 | mode = "determination" | |
1914 | function justice() | |
1915 | mode = "justice" | |
1916 | for i=1,5 do rs:wait() | |
1917 | local asd = Vector3.new(math.random(-10000,10000)/10000,math.random(-10000,10000)/10000,math.random(-10000,10000)/10000) | |
1918 | 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) | |
1919 | end | |
1920 | knife:Destroy() | |
1921 | - | sond.SoundId = "rbxassetid://223103466" |
1921 | + | |
1922 | newWeld(rarm,pistol.asd,0,-1,0) | |
1923 | pistol.asd.Weld.C1 = CFrame.Angles(math.rad(110),0,0) | |
1924 | end | |
1925 | ||
1926 | function determination() | |
1927 | mode = "determination" | |
1928 | for i=1,5 do rs:wait() | |
1929 | local asd = Vector3.new(math.random(-10000,10000)/10000,math.random(-10000,10000)/10000,math.random(-10000,10000)/10000) | |
1930 | 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) | |
1931 | end | |
1932 | pistol:Destroy() | |
1933 | knife = createknife() | |
1934 | newWeld(rarm,knife.asd,0,-1,0) | |
1935 | end | |
1936 | ||
1937 | debounce = false | |
1938 | mouse.KeyDown:connect(function(key) | |
1939 | if debounce == false then | |
1940 | debounce = true | |
1941 | if key == "e" then | |
1942 | if mode == "determination" then | |
1943 | justice() | |
1944 | elseif mode == "justice" then | |
1945 | determination() | |
1946 | end | |
1947 | end | |
1948 | delay(0,function() debounce = false end) | |
1949 | end | |
1950 | end) | |
1951 | ||
1952 | ||
1953 | --// Slash \\-- | |
1954 | ||
1955 | function slash() | |
1956 | local spd = 0.2 | |
1957 | for i=1,15 do rs:wait() | |
1958 | 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) | |
1959 | hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.new(0,0,0) *CFrame.Angles(math.rad(0),math.rad(-30),math.rad(0)), spd) | |
1960 | 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) | |
1961 | 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) | |
1962 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0) *CFrame.Angles(math.rad(0),math.rad(-50),math.rad(10)), spd) | |
1963 | 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) | |
1964 | 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) | |
1965 | end | |
1966 | sound(12222208,root.Position,10,1) | |
1967 | attacking = true | |
1968 | local spd = 0.4 | |
1969 | for i=1,5 do rs:wait() | |
1970 | 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) | |
1971 | hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.new(0,0,0) *CFrame.Angles(math.rad(0),math.rad(80),math.rad(0)), spd) | |
1972 | 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) | |
1973 | 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) | |
1974 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0) *CFrame.Angles(math.rad(0),math.rad(80),math.rad(-20)), spd) | |
1975 | 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) | |
1976 | 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) | |
1977 | end | |
1978 | end | |
1979 | ||
1980 | mouse.Button1Down:connect(function() | |
1981 | if debounce == false and mode == "determination" then | |
1982 | alreadytouched = {} | |
1983 | noidle = true | |
1984 | debounce = true | |
1985 | slash() | |
1986 | attacking = false | |
1987 | noidle = false | |
1988 | delay(0,function() debounce = false end) | |
1989 | end | |
1990 | end) | |
1991 | ||
1992 | --// Shooting gun \\-- | |
1993 | ||
1994 | local jumped = false | |
1995 | function boom() | |
1996 | freeze = true | |
1997 | local bg = Instance.new("BodyGyro",root) | |
1998 | bg.Name = "lolnochara" | |
1999 | bg.P = 10000 | |
2000 | bg.D = 100 | |
2001 | bg.MaxTorque = Vector3.new(9e9,9e9,9e9) | |
2002 | if jumped == false then | |
2003 | root.CFrame = CFrame.new(root.Position,Vector3.new(mouse.Hit.x,root.Position.Y,mouse.Hit.z)) | |
2004 | bg.CFrame = CFrame.new(root.Position,Vector3.new(mouse.Hit.x,root.Position.Y,mouse.Hit.z)) | |
2005 | else | |
2006 | root.CFrame = CFrame.new(root.Position,mouse.Hit.p) | |
2007 | bg.CFrame = CFrame.new(root.Position,mouse.Hit.p) | |
2008 | end | |
2009 | ||
2010 | local spd = 0.2 | |
2011 | for i=1,20 do rs:wait() | |
2012 | if jumped == false then | |
2013 | bg.CFrame = CFrame.new(root.Position,Vector3.new(mouse.Hit.x,root.Position.Y,mouse.Hit.z)) | |
2014 | else | |
2015 | bg.CFrame = CFrame.new(root.Position,mouse.Hit.p) | |
2016 | end | |
2017 | 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) | |
2018 | hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.new(0,0,0) *CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)), spd) | |
2019 | 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) | |
2020 | 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) | |
2021 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0) *CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)), spd) | |
2022 | 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) | |
2023 | 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) | |
2024 | end | |
2025 | ||
2026 | bg:Destroy() | |
2027 | ||
2028 | sound(470245800,root.Position,10,1) | |
2029 | ||
2030 | local Part0 = Instance.new("Part",DebrisModel) | |
2031 | Part0.Name = "Bullet" | |
2032 | Part0.Material = Enum.Material.Neon | |
2033 | Part0.Color = Color3.new(1,1,0) | |
2034 | Part0.Anchored = true | |
2035 | local mesh = Instance.new("SpecialMesh",Part0) | |
2036 | mesh.MeshType = Enum.MeshType.Brick | |
2037 | Part0.CanCollide = false | |
2038 | local Position = rarm.Position | |
2039 | local Target = mouse.Hit.p | |
2040 | local direction = Target - Position | |
2041 | local direction = computeDirection(direction) | |
2042 | local ray = Ray.new(Position, (Target-Position).unit*1048) | |
2043 | local part, endPoint = workspace:FindPartOnRay(ray, char) | |
2044 | Part0.Size = Vector3.new(5,1,5) | |
2045 | mesh.Scale = Vector3.new(1,(Position-endPoint).magnitude+5,1) | |
2046 | local pos = Position + (direction * (mesh.Scale.Y/2)) | |
2047 | Part0.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0) | |
2048 | local loop = nil | |
2049 | local i = 0 | |
2050 | rs:connect(function() | |
2051 | local lole = (i/10) | |
2052 | mesh.Scale = Vector3.new(lole,mesh.Scale.Y,lole) | |
2053 | Part0.Transparency = Part0.Transparency + 0.1 | |
2054 | i = i + 1 | |
2055 | if Part0.Transparency >= 1 then | |
2056 | Part0:Destroy() | |
2057 | end | |
2058 | end) | |
2059 | ||
2060 | if part and part.Parent:FindFirstChildOfClass("Humanoid") and checkIfNotPlayer(part) == true then | |
2061 | coroutine.resume(coroutine.create(function() | |
2062 | sound(337800380,part.Position,10,1) | |
2063 | ded(part.Parent) | |
2064 | end)) | |
2065 | end | |
2066 | ||
2067 | local spd = 0.5 | |
2068 | for i=1,10 do rs:wait() | |
2069 | 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) | |
2070 | hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.new(0,0,0) *CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)), spd) | |
2071 | 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) | |
2072 | 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) | |
2073 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0) *CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)), spd) | |
2074 | 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) | |
2075 | 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) | |
2076 | end | |
2077 | ||
2078 | freeze = false | |
2079 | ||
2080 | end | |
2081 | ||
2082 | mouse.Button1Down:connect(function() | |
2083 | if debounce == false and mode == "justice" then | |
2084 | alreadytouched = {} | |
2085 | noidle = true | |
2086 | debounce = true | |
2087 | boom() | |
2088 | attacking = false | |
2089 | noidle = false | |
2090 | delay(0,function() debounce = false end) | |
2091 | end | |
2092 | end) | |
2093 | ||
2094 | --// Animation and others . . . \\-- | |
2095 | ||
2096 | velocityYFall=0 | |
2097 | velocityYFall2=0 | |
2098 | velocityYFall3=0 | |
2099 | velocityYFall4=0 | |
2100 | neckrotY=0 | |
2101 | neckrotY2=0 | |
2102 | torsorotY=0 | |
2103 | torsorotY2=0 | |
2104 | torsoY=0 | |
2105 | torsoY2=0 | |
2106 | colored = 0 | |
2107 | sine = 0 | |
2108 | change=0.4 | |
2109 | movement=5 | |
2110 | timeranim=0 | |
2111 | running = false | |
2112 | glitched = false | |
2113 | backup = hed.Weld.C1 | |
2114 | glitchedC1 = hed.Weld.C1 | |
2115 | ||
2116 | mouse.KeyDown:connect(function(key) | |
2117 | key = string.lower(key) | |
2118 | if string.byte(key) == 48 then | |
2119 | running = true | |
2120 | local keyup = mouse.KeyUp:connect(function(key) | |
2121 | if string.byte(key) == 48 then | |
2122 | running = false | |
2123 | end | |
2124 | end) | |
2125 | repeat rs:wait() until running == false | |
2126 | keyup:disconnect() | |
2127 | end | |
2128 | end) | |
2129 | ||
2130 | icolor=1 | |
2131 | imode=false | |
2132 | ||
2133 | didjump = false | |
2134 | jumppower = 0 | |
2135 | freeze = false | |
2136 | debounceimpact = false | |
2137 | ||
2138 | function jumpimpact() | |
2139 | if debounceimpact == false then | |
2140 | debounceimpact = true | |
2141 | if jumppower < -150 then jumppower = -150 end | |
2142 | shake(-jumppower/5) | |
2143 | for i=1,-jumppower/20 do rs:wait() | |
2144 | hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0,0,0), 0.05) | |
2145 | 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) | |
2146 | end | |
2147 | debounceimpact = false | |
2148 | end | |
2149 | end | |
2150 | ||
2151 | local sond = nil | |
2152 | rs:connect(function() | |
2153 | ||
2154 | if not torso:FindFirstChild("STATICSOUND") then | |
2155 | sond=Instance.new("Sound",torso) | |
2156 | sond.Name = "STATICSOUND" | |
2157 | sond.SoundId = "rbxassetid://...." | |
2158 | sond.Looped = true | |
2159 | sond:Play() | |
2160 | end | |
2161 | ||
2162 | if icolor > 1 then | |
2163 | imode = false | |
2164 | elseif icolor < 0 then | |
2165 | imode = true | |
2166 | end | |
2167 | ||
2168 | if imode == true then | |
2169 | icolor = icolor + 0.01 | |
2170 | else | |
2171 | icolor = icolor - 0.01 | |
2172 | end | |
2173 | ||
2174 | if p.Character.Parent == nil then | |
2175 | local model = Instance.new("Model") | |
2176 | model.Name = p.Name | |
2177 | p.Character = model | |
2178 | for i,v in pairs(char:GetChildren()) do | |
2179 | v.Parent = p.Character | |
2180 | end | |
2181 | end | |
2182 | ||
2183 | char = p.Character | |
2184 | if p.Character.Parent ~= workspace then | |
2185 | p.Character.Parent = workspace | |
2186 | end | |
2187 | for i,v in pairs(char:GetChildren()) do | |
2188 | if v:IsA("Accoutrement") then | |
2189 | if v.Handle:FindFirstChild("Mesh") then | |
2190 | v.Handle:FindFirstChild("Mesh").Offset = Vector3.new() | |
2191 | v.Handle.Transparency = 0 | |
2192 | end | |
2193 | elseif v:IsA("BasePart") then | |
2194 | v.Anchored = false | |
2195 | if v:FindFirstChildOfClass("BodyPosition") then | |
2196 | v:FindFirstChildOfClass("BodyPosition"):Destroy() | |
2197 | end | |
2198 | if v:FindFirstChildOfClass("BodyVelocity") then | |
2199 | v:FindFirstChildOfClass("BodyVelocity"):Destroy() | |
2200 | end | |
2201 | if v:FindFirstChildOfClass("BodyGyro") and v:FindFirstChildOfClass("BodyGyro").Name ~= "lolnochara" then | |
2202 | v:FindFirstChildOfClass("BodyGyro"):Destroy() | |
2203 | end | |
2204 | if v:FindFirstChild("Mesh") then | |
2205 | v:FindFirstChild("Mesh").Offset = Vector3.new() | |
2206 | end | |
2207 | if not DebrisModel:FindFirstChild(v.Name.."FORCEFIELD") then | |
2208 | local force = Instance.new("Part",DebrisModel) | |
2209 | force.Name = v.Name.."FORCEFIELD" | |
2210 | force.Size = v.Size+(Vector3.new(1,1,1)*0.2) | |
2211 | force.CanCollide = false | |
2212 | force.Transparency = 1 | |
2213 | newWeld(v,force,0,0,0) | |
2214 | else | |
2215 | if not DebrisModel:FindFirstChild(v.Name.."FORCEFIELD"):FindFirstChildOfClass("Weld") then | |
2216 | newWeld(v,DebrisModel:FindFirstChild(v.Name.."FORCEFIELD"),0,0,0) | |
2217 | end | |
2218 | end | |
2219 | if v.Name ~= "HumanoidRootPart" then | |
2220 | v.Transparency = 0 | |
2221 | else | |
2222 | v.Transparency = 1 | |
2223 | end | |
2224 | end | |
2225 | end | |
2226 | ||
2227 | if mode == "determination" then | |
2228 | trail.Enabled = true | |
2229 | else | |
2230 | trail.Enabled = false | |
2231 | end | |
2232 | ||
2233 | if freeze == false then | |
2234 | if running == false then | |
2235 | hum.WalkSpeed = 12*size | |
2236 | change=0.4 | |
2237 | movement=5 | |
2238 | else | |
2239 | hum.WalkSpeed = (666/10)*size | |
2240 | if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude >= 5*size then | |
2241 | change=1 | |
2242 | else | |
2243 | change=0.4 | |
2244 | end | |
2245 | movement=15 | |
2246 | end | |
2247 | else | |
2248 | hum.WalkSpeed = 1 | |
2249 | change=0.4 | |
2250 | movement=5 | |
2251 | end | |
2252 | ||
2253 | if -root.Velocity.Y/1.5 > -5 and -root.Velocity.Y/1.5 < 150 then | |
2254 | velocityYFall = root.Velocity.Y/1.5 | |
2255 | else | |
2256 | if -root.Velocity.Y/1.5 < -5 then | |
2257 | velocityYFall = 5 | |
2258 | elseif -root.Velocity.Y/1.5 > 150 then | |
2259 | velocityYFall = -150 | |
2260 | end | |
2261 | end | |
2262 | ||
2263 | if -root.Velocity.Y/180 > 0 and -root.Velocity.Y/180 < 1.2 then | |
2264 | velocityYFall2 = root.Velocity.Y/180 | |
2265 | else | |
2266 | if -root.Velocity.Y/180 < 0 then | |
2267 | velocityYFall2 = 0 | |
2268 | elseif -root.Velocity.Y/180 > 1.2 then | |
2269 | velocityYFall2 = -1.2 | |
2270 | end | |
2271 | end | |
2272 | ||
2273 | if -root.Velocity.Y/1.5 > -5 and -root.Velocity.Y/1.5 < 50 then | |
2274 | velocityYFall3 = root.Velocity.Y/1.5 | |
2275 | else | |
2276 | if -root.Velocity.Y/1.5 < -5 then | |
2277 | velocityYFall3 = 5 | |
2278 | elseif -root.Velocity.Y/1.5 > 50 then | |
2279 | velocityYFall3 = -50 | |
2280 | end | |
2281 | end | |
2282 | ||
2283 | if -root.Velocity.Y/1.5 > -50 and -root.Velocity.Y/1.5 < 20 then | |
2284 | velocityYFall4 = root.Velocity.Y/1.5 | |
2285 | else | |
2286 | if -root.Velocity.Y/180 < -5 then | |
2287 | velocityYFall4 = 5 | |
2288 | elseif -root.Velocity.Y/180 > 50 then | |
2289 | velocityYFall4 = -50 | |
2290 | end | |
2291 | end | |
2292 | ||
2293 | if root.RotVelocity.Y/6 < 1 and root.RotVelocity.Y/6 > -1 then | |
2294 | neckrotY = root.RotVelocity.Y/6 | |
2295 | else | |
2296 | if root.RotVelocity.Y/6 < -1 then | |
2297 | neckrotY = -1 | |
2298 | elseif root.RotVelocity.Y/6 > 1 then | |
2299 | neckrotY = 1 | |
2300 | end | |
2301 | end | |
2302 | ||
2303 | if root.RotVelocity.Y/8 < 0.6 and root.RotVelocity.Y/8 > -0.6 then | |
2304 | neckrotY2 = root.RotVelocity.Y/8 | |
2305 | else | |
2306 | if root.RotVelocity.Y/8 < -0.6 then | |
2307 | neckrotY2 = -0.6 | |
2308 | elseif root.RotVelocity.Y/8 > 0.6 then | |
2309 | neckrotY2 = 0.6 | |
2310 | end | |
2311 | end | |
2312 | ||
2313 | if root.RotVelocity.Y/6 < 0.2 and root.RotVelocity.Y/6 > -0.2 then | |
2314 | torsorotY = root.RotVelocity.Y/6 | |
2315 | else | |
2316 | if root.RotVelocity.Y/6 < -0.2 then | |
2317 | torsorotY = -0.2 | |
2318 | elseif root.RotVelocity.Y/6 > 0.2 then | |
2319 | torsorotY = 0.2 | |
2320 | end | |
2321 | end | |
2322 | ||
2323 | if root.RotVelocity.Y/8 < 0.2 and root.RotVelocity.Y/8 > -0.2 then | |
2324 | torsorotY2 = root.RotVelocity.Y/8 | |
2325 | else | |
2326 | if root.RotVelocity.Y/8 < -0.2 then | |
2327 | torsorotY2 = -0.2 | |
2328 | elseif root.RotVelocity.Y/8 > 0.2 then | |
2329 | torsorotY2 = 0.2 | |
2330 | end | |
2331 | end | |
2332 | ||
2333 | torsoY = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/20 | |
2334 | torsoY2 = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/36 | |
2335 | ||
2336 | local ray1 = Ray.new(root.Position+Vector3.new(size,0,0),Vector3.new(0, -4*size, 0)) | |
2337 | local part1, endPoint = workspace:FindPartOnRay(ray1, char) | |
2338 | local ray2 = Ray.new(root.Position-Vector3.new(size,0,0),Vector3.new(0, -4*size, 0)) | |
2339 | local part2, endPoint = workspace:FindPartOnRay(ray2, char) | |
2340 | local ray3 = Ray.new(root.Position+Vector3.new(0,0,size/2),Vector3.new(0, -4*size, 0)) | |
2341 | local part3, endPoint = workspace:FindPartOnRay(ray3, char) | |
2342 | local ray4 = Ray.new(root.Position-Vector3.new(0,0,size/2),Vector3.new(0, -4*size, 0)) | |
2343 | local part4, endPoint = workspace:FindPartOnRay(ray4, char) | |
2344 | local ray = Ray.new(root.Position,Vector3.new(0, -6, 0)) | |
2345 | local part, endPoint = workspace:FindPartOnRay(ray, char) | |
2346 | ||
2347 | if part1 or part2 or part3 or part4 then jumped = false else endPoint = 0 jumped = true end | |
2348 | ||
2349 | local rlegray = Ray.new(rleg.Position+Vector3.new(0,size/2,0),Vector3.new(0, -1.75*size, 0)) | |
2350 | local rlegpart, rlegendPoint = workspace:FindPartOnRay(rlegray, char) | |
2351 | ||
2352 | local llegray = Ray.new(lleg.Position+Vector3.new(0,size/2,0),Vector3.new(0, -1.75*size, 0)) | |
2353 | local llegpart, llegendPoint = workspace:FindPartOnRay(llegray, char) | |
2354 | ||
2355 | if hum.Health > 0 and noidle == false then | |
2356 | if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude >= 5 and jumped == false then | |
2357 | 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) | |
2358 | 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) | |
2359 | 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) | |
2360 | 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) | |
2361 | 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) | |
2362 | 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) | |
2363 | 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) | |
2364 | elseif jumped == true then | |
2365 | didjump = true | |
2366 | jumppower = root.Velocity.Y | |
2367 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.1) * CFrame.Angles(0,0,0), 0.4) | |
2368 | hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(math.rad(-velocityYFall3/5),0,0), 0.1) | |
2369 | 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) | |
2370 | 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) | |
2371 | 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) | |
2372 | 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) | |
2373 | 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) | |
2374 | elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 5*size then | |
2375 | 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) | |
2376 | 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) | |
2377 | 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) | |
2378 | 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) | |
2379 | 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) | |
2380 | 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) | |
2381 | 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) | |
2382 | end | |
2383 | end | |
2384 | if didjump == true and jumped == false and jumppower < 0 then | |
2385 | didjump = false | |
2386 | jumpimpact() | |
2387 | end | |
2388 | ||
2389 | timeposition = soundz.TimePosition | |
2390 | sine = sine + change | |
2391 | hum.Health = math.huge | |
2392 | hum.MaxHealth = math.huge | |
2393 | end) |