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