SHOW:
|
|
- or go back to the newest paste.
1 | if game:GetService("RunService"):IsClient() then error("Please run as a server script. Use h/ instead of hl/.") end | |
2 | - | --|| GUNJOURER BY SHACKLUSTER |
2 | + | print("FE Compatibility: by WaverlyCole & Mokiros") |
3 | - | --\\====================================================//-- |
3 | + | InternalData = {} |
4 | do | |
5 | script.Parent = owner.Character | |
6 | local Event = Instance.new("RemoteEvent") | |
7 | Event.Name = "UserInput" | |
8 | local function NewFakeEvent() | |
9 | local Fake = {fakeEvent=true,Connect=function(self,Func)self.Function=Func end}Fake.connect = Fake.Connect | |
10 | return Fake | |
11 | end | |
12 | local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()} | |
13 | local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()} | |
14 | local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...) | |
15 | self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil | |
16 | end};ContextActionService.UnBindAction = ContextActionService.BindAction | |
17 | local function TriggerEvent(self,Event,...) | |
18 | local Trigger = Mouse[Event] | |
19 | if Trigger and Trigger.fakeEvent and Trigger.Function then | |
20 | Trigger.Function(...) | |
21 | end | |
22 | end | |
23 | Mouse.TrigEvent = TriggerEvent | |
24 | UserInputService.TrigEvent = TriggerEvent | |
25 | Event.OnServerEvent:Connect(function(FiredBy,Input) | |
26 | if FiredBy.Name ~= owner.Name then end | |
27 | if Input.MouseEvent then | |
28 | Mouse.Target = Input.Target | |
29 | Mouse.Hit = Input.Hit | |
30 | else | |
31 | - | local Controller = plr.PlayerScripts:WaitForChild("ControlScript") |
31 | + | local Begin = Input.UserInputState == Enum.UserInputState.Begin |
32 | if Input.UserInputType == Enum.UserInputType.MouseButton1 then | |
33 | return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") | |
34 | end | |
35 | for _,Action in pairs(ContextActionService.Actions) do | |
36 | for _,Key in pairs(Action.Keys) do | |
37 | if Key==Input.KeyCode then | |
38 | Action.Function(Action.Name,Input.UserInputState,Input) | |
39 | end | |
40 | end | |
41 | end | |
42 | Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower()) | |
43 | UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false) | |
44 | end | |
45 | end) | |
46 | InternalData["Mouse"] = Mouse | |
47 | InternalData["ContextActionService"] = ContextActionService | |
48 | InternalData["UserInputService"] = UserInputService | |
49 | Event.Parent = NLS([[ | |
50 | local Player = owner | |
51 | local Event = script:WaitForChild("UserInput") | |
52 | local UserInputService = game:GetService("UserInputService") | |
53 | local Mouse = Player:GetMouse() | |
54 | local Input = function(Input,gameProcessedEvent) | |
55 | if gameProcessedEvent then return end | |
56 | Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState}) | |
57 | end | |
58 | UserInputService.InputBegan:Connect(Input) | |
59 | UserInputService.InputEnded:Connect(Input) | |
60 | local Hit,Target | |
61 | while wait(1/30) do | |
62 | if Hit ~= Mouse.Hit or Target ~= Mouse.Target then | |
63 | Hit,Target = Mouse.Hit,Mouse.Target | |
64 | Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit}) | |
65 | end | |
66 | end | |
67 | ]],owner.Character) | |
68 | end | |
69 | RealGame = game;game = setmetatable({},{ | |
70 | __index = function (self,Index) | |
71 | local Sandbox = function (Thing) | |
72 | if Thing:IsA("Player") then | |
73 | local RealPlayer = Thing | |
74 | return setmetatable({},{ | |
75 | __index = function (self,Index) | |
76 | local Type = type(RealPlayer[Index]) | |
77 | if Type == "function" then | |
78 | if Index:lower() == "getmouse" or Index:lower() == "mouse" then | |
79 | return function (self) | |
80 | return InternalData["Mouse"] | |
81 | end | |
82 | end | |
83 | return function (self,...) | |
84 | return RealPlayer[Index](RealPlayer,...) | |
85 | end | |
86 | else | |
87 | return RealPlayer[Index] | |
88 | end | |
89 | end; | |
90 | __tostring = function(self) | |
91 | return RealPlayer.Name | |
92 | end | |
93 | }) | |
94 | end | |
95 | end | |
96 | if RealGame[Index] then | |
97 | local Type = type(RealGame[Index]) | |
98 | if Type == "function" then | |
99 | if Index:lower() == "getservice" or Index:lower() == "service" then | |
100 | return function (self,Service) | |
101 | if Service:lower() == "players" then | |
102 | return setmetatable({},{ | |
103 | __index = function (self2,Index2) | |
104 | local RealService = RealGame:GetService(Service) | |
105 | local Type2 = type(Index2) | |
106 | if Type2 == "function" then | |
107 | return function (self,...) | |
108 | return RealService[Index2](RealService,...) | |
109 | end | |
110 | else | |
111 | if Index2:lower() == "localplayer" then | |
112 | return Sandbox(owner) | |
113 | end | |
114 | return RealService[Index2] | |
115 | end | |
116 | end; | |
117 | __tostring = function(self) | |
118 | return RealGame:GetService(Service).Name | |
119 | end | |
120 | }) | |
121 | elseif Service:lower() == "contextactionservice" then | |
122 | return InternalData["ContextActionService"] | |
123 | elseif Service:lower() == "contextactionservice" then | |
124 | return InternalData["UserInputService"] | |
125 | elseif Service:lower() == "runservice" then | |
126 | return setmetatable({},{ | |
127 | __index = function(self2,Index2) | |
128 | local RealService = RealGame:GetService(Service) | |
129 | local Type2 = type(Index2) | |
130 | if Type2 == "function" then | |
131 | return function (self,...) | |
132 | return RealService[Index2](RealService,...) | |
133 | end | |
134 | else | |
135 | if Index2:lower() == "bindtorenderstep" then | |
136 | return function (self,Name,Priority,Function) | |
137 | return RealGame:GetService("RunService").Stepped:Connect(Function) | |
138 | end | |
139 | end | |
140 | if Index2:lower() == "renderstepped" then | |
141 | return RealService["Stepped"] | |
142 | end | |
143 | return RealService[Index2] | |
144 | end | |
145 | end | |
146 | }) | |
147 | else | |
148 | return RealGame:GetService(Service) | |
149 | end | |
150 | end | |
151 | end | |
152 | return function (self,...) | |
153 | return RealGame[Index](RealGame,...) | |
154 | end | |
155 | else | |
156 | if game:GetService(Index) then | |
157 | return game:GetService(Index) | |
158 | end | |
159 | return RealGame[Index] | |
160 | end | |
161 | else | |
162 | return nil | |
163 | end | |
164 | end | |
165 | });Game = game;owner = game:GetService("Players").LocalPlayer | |
166 | print("Complete! Running... Created by Shackluster ") | |
167 | ||
168 | wait(0.2) | |
169 | ||
170 | Player = game:GetService("Players").LocalPlayer | |
171 | PlayerGui = Player.PlayerGui | |
172 | Cam = workspace.CurrentCamera | |
173 | Backpack = Player.Backpack | |
174 | Character = Player.Character | |
175 | Humanoid = Character.Humanoid | |
176 | Mouse = Player:GetMouse() | |
177 | RootPart = Character["HumanoidRootPart"] | |
178 | Torso = Character["Torso"] | |
179 | Head = Character["Head"] | |
180 | RightArm = Character["Right Arm"] | |
181 | LeftArm = Character["Left Arm"] | |
182 | RightLeg = Character["Right Leg"] | |
183 | LeftLeg = Character["Left Leg"] | |
184 | RootJoint = RootPart["RootJoint"] | |
185 | Neck = Torso["Neck"] | |
186 | RightShoulder = Torso["Right Shoulder"] | |
187 | LeftShoulder = Torso["Left Shoulder"] | |
188 | RightHip = Torso["Right Hip"] | |
189 | LeftHip = Torso["Left Hip"] | |
190 | plr = game:GetService("Players").LocalPlayer | |
191 | char = plr.Character | |
192 | hum = char.Humanoid | |
193 | local cam = game.Workspace.CurrentCamera | |
194 | Camera = cam | |
195 | local CamInterrupt = false | |
196 | local TwoD = false | |
197 | local TargetInfo = {nil, nil} | |
198 | cam.CameraType = "Custom" | |
199 | t = char.Torso | |
200 | h = char.Head | |
201 | ra = char["Right Arm"] | |
202 | la = char["Left Arm"] | |
203 | rl = char["Right Leg"] | |
204 | ll = char["Left Leg"] | |
205 | tors = char.Torso | |
206 | lleg = char["Left Leg"] | |
207 | root = char.HumanoidRootPart | |
208 | hed = char.Head | |
209 | rleg = char["Right Leg"] | |
210 | rarm = char["Right Arm"] | |
211 | larm = char["Left Arm"] | |
212 | radian = math.rad | |
213 | random = math.random | |
214 | Vec3 = Vector3.new | |
215 | Inst = Instance.new | |
216 | cFrame = CFrame.new | |
217 | Euler = CFrame.fromEulerAnglesXYZ | |
218 | vt = Vector3.new | |
219 | bc = BrickColor.new | |
220 | br = BrickColor.random | |
221 | it = Instance.new | |
222 | cf = CFrame.new | |
223 | local eff = true | |
224 | local shielding = false | |
225 | ||
226 | IT = Instance.new | |
227 | CF = CFrame.new | |
228 | VT = Vector3.new | |
229 | RAD = math.rad | |
230 | C3 = Color3.new | |
231 | UD2 = UDim2.new | |
232 | BRICKC = BrickColor.new | |
233 | ANGLES = CFrame.Angles | |
234 | EULER = CFrame.fromEulerAnglesXYZ | |
235 | COS = math.cos | |
236 | ACOS = math.acos | |
237 | SIN = math.sin | |
238 | ASIN = math.asin | |
239 | ABS = math.abs | |
240 | MRANDOM = math.random | |
241 | FLOOR = math.floor | |
242 | ||
243 | --//=================================\\ | |
244 | --|| USEFUL VALUES | |
245 | --\\=================================// | |
246 | ||
247 | Animation_Speed = 3 | |
248 | Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60) | |
249 | local Speed = 35 | |
250 | local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
251 | local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
252 | local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) | |
253 | local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) | |
254 | local DAMAGEMULTIPLIER = 1 | |
255 | local ANIM = "Idle" | |
256 | local ATTACK = false | |
257 | local EQUIPPED = false | |
258 | local HOLD = false | |
259 | local COMBO = 1 | |
260 | local Rooted = false | |
261 | local SINE = 0 | |
262 | local KEYHOLD = false | |
263 | local CHANGE = 2 / Animation_Speed | |
264 | local WALKINGANIM = false | |
265 | local VALUE1 = false | |
266 | local VALUE2 = false | |
267 | local ROBLOXIDLEANIMATION = IT("Animation") | |
268 | ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation" | |
269 | ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571" | |
270 | --ROBLOXIDLEANIMATION.Parent = Humanoid | |
271 | local WEAPONGUI = IT("ScreenGui", PlayerGui) | |
272 | WEAPONGUI.Name = "GUNJOURER_GUI_SHACKLUSTER" | |
273 | local Effects = IT("Folder", Character) | |
274 | Effects.Name = "Effects" | |
275 | local ANIMATOR = Humanoid.Animator | |
276 | local ANIMATE = Character.Animate | |
277 | local UNANCHOR = true | |
278 | local TRIPWIRE = false | |
279 | ||
280 | --//=================================\\ | |
281 | --\\=================================// | |
282 | ||
283 | local Hair = Instance.new("Part", char) | |
284 | Hair.Name = "Hair" | |
285 | Hair.CanCollide = false | |
286 | Hair.BrickColor = BrickColor.new("Institutional white") | |
287 | Hair.Transparency = 0 | |
288 | Hair.Material = "Plastic" | |
289 | Hair.Size = Vector3.new(1, 1, 2) | |
290 | Hair.TopSurface = Enum.SurfaceType.Smooth | |
291 | Hair.BottomSurface = Enum.SurfaceType.Smooth | |
292 | ||
293 | local Weld = Instance.new("Weld", Hair) | |
294 | Weld.Part0 = hed | |
295 | Weld.Part1 = Hair | |
296 | Weld.C1 = CFrame.new(0, -.6, 0) | |
297 | Weld.C0 = CFrame.Angles(math.rad(0),math.rad(0),0) | |
298 | ||
299 | local M2 = Instance.new("SpecialMesh") | |
300 | M2.Parent = Hair | |
301 | M2.MeshId = "http://www.roblox.com/asset/?id=1047997" | |
302 | M2.TextureId = "http://www.roblox.com/asset/?id=1047998" | |
303 | M2.Scale = Vector3.new(1.5, 1.5, 1.5) | |
304 | ----------------------------------------------------- | |
305 | for i,v in pairs(char:children()) do | |
306 | if v:IsA("Shirt") and v:IsA("Pants") and v:IsA("Hat") and v:IsA("Accessory") then | |
307 | v:Remove() | |
308 | end | |
309 | end | |
310 | shirt = Instance.new("Shirt", char) | |
311 | shirt.Name = "Shirt" | |
312 | pants = Instance.new("Pants", char) | |
313 | pants.Name = "Pants" | |
314 | char.Shirt.ShirtTemplate = "rbxassetid://676428254" | |
315 | char.Pants.PantsTemplate = "rbxassetid://676428351" | |
316 | ----------------------------------------------------- | |
317 | CV="Maroon" | |
318 | Player = game.Players.LocalPlayer | |
319 | Character = Player.Character | |
320 | local txt = Instance.new("BillboardGui", Character) | |
321 | txt.Adornee = Character .Head | |
322 | txt.Name = "_status" | |
323 | txt.Size = UDim2.new(2, 0, 1.2, 0) | |
324 | txt.StudsOffset = Vector3.new(-9, 8, 0) | |
325 | local text = Instance.new("TextLabel", txt) | |
326 | text.Size = UDim2.new(10, 0, 7, 0) | |
327 | text.FontSize = "Size24" | |
328 | text.TextScaled = true | |
329 | text.TextTransparency = 0 | |
330 | text.BackgroundTransparency = 1 | |
331 | text.TextTransparency = 0 | |
332 | text.TextStrokeTransparency = 0 | |
333 | text.Font = "Bodoni" | |
334 | text.TextStrokeColor3 = Color3.new(222,255,0) | |
335 | ||
336 | v=Instance.new("Part") | |
337 | v.Name = "ColorBrick" | |
338 | v.Parent=Player.Character | |
339 | v.FormFactor="Symmetric" | |
340 | v.Anchored=true | |
341 | v.CanCollide=false | |
342 | v.BottomSurface="Smooth" | |
343 | v.TopSurface="Smooth" | |
344 | v.Size=Vector3.new(3,3,3) | |
345 | v.Transparency=1 | |
346 | v.CFrame=Character.Torso.CFrame | |
347 | v.BrickColor=BrickColor.new(CV) | |
348 | v.Transparency=1 | |
349 | text.TextColor3 = Color3.new(222,255,0) | |
350 | v.Shape="Block" | |
351 | text.Text = "Oof Lord" | |
352 | ||
353 | --//=================================\\ | |
354 | --|| SAZERENOS' ARTIFICIAL HEARTBEAT | |
355 | --\\=================================// | |
356 | ||
357 | ArtificialHB = Instance.new("BindableEvent", script) | |
358 | ArtificialHB.Name = "ArtificialHB" | |
359 | ||
360 | script:WaitForChild("ArtificialHB") | |
361 | ||
362 | frame = Frame_Speed | |
363 | tf = 0 | |
364 | allowframeloss = false | |
365 | tossremainder = false | |
366 | lastframe = tick() | |
367 | script.ArtificialHB:Fire() | |
368 | ||
369 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
370 | tf = tf + s | |
371 | if tf >= frame then | |
372 | if allowframeloss then | |
373 | ArtificialHB:Fire() | |
374 | lastframe = tick() | |
375 | else | |
376 | for i = 1, math.floor(tf / frame) do | |
377 | ArtificialHB:Fire() | |
378 | end | |
379 | lastframe = tick() | |
380 | end | |
381 | if tossremainder then | |
382 | tf = 0 | |
383 | else | |
384 | tf = tf - frame * math.floor(tf / frame) | |
385 | end | |
386 | end | |
387 | end) | |
388 | ||
389 | --//=================================\\ | |
390 | --\\=================================// | |
391 | ||
392 | --//=================================\\ | |
393 | --|| SOME FUNCTIONS | |
394 | --\\=================================// | |
395 | ||
396 | function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS) | |
397 | return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS) | |
398 | end | |
399 | ||
400 | function PositiveAngle(NUMBER) | |
401 | if NUMBER >= 0 then | |
402 | NUMBER = 0 | |
403 | end | |
404 | return NUMBER | |
405 | end | |
406 | ||
407 | function NegativeAngle(NUMBER) | |
408 | if NUMBER <= 0 then | |
409 | NUMBER = 0 | |
410 | end | |
411 | return NUMBER | |
412 | end | |
413 | ||
414 | function Swait(NUMBER) | |
415 | if NUMBER == 0 or NUMBER == nil then | |
416 | ArtificialHB.Event:wait() | |
417 | else | |
418 | for i = 1, NUMBER do | |
419 | ArtificialHB.Event:wait() | |
420 | end | |
421 | end | |
422 | end | |
423 | ||
424 | function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET) | |
425 | local NEWMESH = IT(MESH) | |
426 | if MESH == "SpecialMesh" then | |
427 | NEWMESH.MeshType = MESHTYPE | |
428 | if MESHID ~= "nil" and MESHID ~= "" then | |
429 | NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID | |
430 | end | |
431 | if TEXTUREID ~= "nil" and TEXTUREID ~= "" then | |
432 | NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID | |
433 | end | |
434 | end | |
435 | NEWMESH.Offset = OFFSET or VT(0, 0, 0) | |
436 | NEWMESH.Scale = SCALE | |
437 | NEWMESH.Parent = PARENT | |
438 | return NEWMESH | |
439 | end | |
440 | ||
441 | function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR) | |
442 | local NEWPART = IT("Part") | |
443 | NEWPART.formFactor = FORMFACTOR | |
444 | NEWPART.Reflectance = REFLECTANCE | |
445 | NEWPART.Transparency = TRANSPARENCY | |
446 | NEWPART.CanCollide = false | |
447 | NEWPART.Locked = true | |
448 | NEWPART.Anchored = true | |
449 | if ANCHOR == false then | |
450 | NEWPART.Anchored = false | |
451 | end | |
452 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
453 | NEWPART.Name = NAME | |
454 | NEWPART.Size = SIZE | |
455 | NEWPART.Position = Torso.Position | |
456 | NEWPART.Material = MATERIAL | |
457 | NEWPART:BreakJoints() | |
458 | NEWPART.Parent = PARENT | |
459 | return NEWPART | |
460 | end | |
461 | ||
462 | local function weldBetween(a, b) | |
463 | local weldd = Instance.new("ManualWeld") | |
464 | weldd.Part0 = a | |
465 | weldd.Part1 = b | |
466 | weldd.C0 = CFrame.new() | |
467 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
468 | weldd.Parent = a | |
469 | return weldd | |
470 | end | |
471 | ||
472 | ||
473 | function QuaternionFromCFrame(cf) | |
474 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
475 | local trace = m00 + m11 + m22 | |
476 | if trace > 0 then | |
477 | local s = math.sqrt(1 + trace) | |
478 | local recip = 0.5 / s | |
479 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
480 | else | |
481 | local i = 0 | |
482 | if m11 > m00 then | |
483 | i = 1 | |
484 | end | |
485 | if m22 > (i == 0 and m00 or m11) then | |
486 | i = 2 | |
487 | end | |
488 | if i == 0 then | |
489 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
490 | local recip = 0.5 / s | |
491 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
492 | elseif i == 1 then | |
493 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
494 | local recip = 0.5 / s | |
495 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
496 | elseif i == 2 then | |
497 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
498 | local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
499 | end | |
500 | end | |
501 | end | |
502 | ||
503 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
504 | local xs, ys, zs = x + x, y + y, z + z | |
505 | local wx, wy, wz = w * xs, w * ys, w * zs | |
506 | local xx = x * xs | |
507 | local xy = x * ys | |
508 | local xz = x * zs | |
509 | local yy = y * ys | |
510 | local yz = y * zs | |
511 | local zz = z * zs | |
512 | return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy)) | |
513 | end | |
514 | ||
515 | function QuaternionSlerp(a, b, t) | |
516 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
517 | local startInterp, finishInterp; | |
518 | if cosTheta >= 0.0001 then | |
519 | if (1 - cosTheta) > 0.0001 then | |
520 | local theta = ACOS(cosTheta) | |
521 | local invSinTheta = 1 / SIN(theta) | |
522 | startInterp = SIN((1 - t) * theta) * invSinTheta | |
523 | finishInterp = SIN(t * theta) * invSinTheta | |
524 | else | |
525 | startInterp = 1 - t | |
526 | finishInterp = t | |
527 | end | |
528 | else | |
529 | if (1 + cosTheta) > 0.0001 then | |
530 | local theta = ACOS(-cosTheta) | |
531 | local invSinTheta = 1 / SIN(theta) | |
532 | startInterp = SIN((t - 1) * theta) * invSinTheta | |
533 | finishInterp = SIN(t * theta) * invSinTheta | |
534 | else | |
535 | startInterp = t - 1 | |
536 | finishInterp = t | |
537 | end | |
538 | end | |
539 | return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp | |
540 | end | |
541 | ||
542 | function Clerp(a, b, t) | |
543 | local qa = {QuaternionFromCFrame(a)} | |
544 | local qb = {QuaternionFromCFrame(b)} | |
545 | local ax, ay, az = a.x, a.y, a.z | |
546 | local bx, by, bz = b.x, b.y, b.z | |
547 | local _t = 1 - t | |
548 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
549 | end | |
550 | ||
551 | function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME) | |
552 | local frame = IT("Frame") | |
553 | frame.BackgroundTransparency = TRANSPARENCY | |
554 | frame.BorderSizePixel = BORDERSIZEPIXEL | |
555 | frame.Position = POSITION | |
556 | frame.Size = SIZE | |
557 | frame.BackgroundColor3 = COLOR | |
558 | frame.BorderColor3 = BORDERCOLOR | |
559 | frame.Name = NAME | |
560 | frame.Parent = PARENT | |
561 | return frame | |
562 | end | |
563 | ||
564 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
565 | local label = IT("TextLabel") | |
566 | label.BackgroundTransparency = 1 | |
567 | label.Size = UD2(1, 0, 1, 0) | |
568 | label.Position = UD2(0, 0, 0, 0) | |
569 | label.TextColor3 = TEXTCOLOR | |
570 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
571 | label.TextTransparency = TRANSPARENCY | |
572 | label.FontSize = TEXTFONTSIZE | |
573 | label.Font = TEXTFONT | |
574 | label.BorderSizePixel = BORDERSIZEPIXEL | |
575 | label.TextScaled = false | |
576 | label.Text = TEXT | |
577 | label.Name = NAME | |
578 | label.Parent = PARENT | |
579 | return label | |
580 | end | |
581 | ||
582 | function NoOutlines(PART) | |
583 | PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10 | |
584 | end | |
585 | ||
586 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
587 | local NEWWELD = IT(TYPE) | |
588 | NEWWELD.Part0 = PART0 | |
589 | NEWWELD.Part1 = PART1 | |
590 | NEWWELD.C0 = C0 | |
591 | NEWWELD.C1 = C1 | |
592 | NEWWELD.Parent = PARENT | |
593 | return NEWWELD | |
594 | end | |
595 | ||
596 | local S = IT("Sound") | |
597 | function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP) | |
598 | local NEWSOUND = nil | |
599 | coroutine.resume(coroutine.create(function() | |
600 | NEWSOUND = S:Clone() | |
601 | NEWSOUND.Parent = PARENT | |
602 | NEWSOUND.Volume = VOLUME | |
603 | NEWSOUND.Pitch = PITCH | |
604 | NEWSOUND.SoundId = "rbxassetid://"..ID | |
605 | NEWSOUND:play() | |
606 | if DOESLOOP == true then | |
607 | NEWSOUND.Looped = true | |
608 | else | |
609 | repeat wait(1) until NEWSOUND.Playing == false | |
610 | NEWSOUND:remove() | |
611 | end | |
612 | end)) | |
613 | return NEWSOUND | |
614 | end | |
615 | ||
616 | function CFrameFromTopBack(at, top, back) | |
617 | local right = top:Cross(back) | |
618 | return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z) | |
619 | end | |
620 | ||
621 | --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0}) | |
622 | function WACKYEFFECT(Table) | |
623 | local TYPE = (Table.EffectType or "Sphere") | |
624 | local SIZE = (Table.Size or VT(1,1,1)) | |
625 | local ENDSIZE = (Table.Size2 or VT(0,0,0)) | |
626 | local TRANSPARENCY = (Table.Transparency or 0) | |
627 | local ENDTRANSPARENCY = (Table.Transparency2 or 1) | |
628 | local CFRAME = (Table.CFrame or Torso.CFrame) | |
629 | local MOVEDIRECTION = (Table.MoveToPos or nil) | |
630 | local ROTATION1 = (Table.RotationX or 0) | |
631 | local ROTATION2 = (Table.RotationY or 0) | |
632 | local ROTATION3 = (Table.RotationZ or 0) | |
633 | local MATERIAL = (Table.Material or "Neon") | |
634 | local COLOR = (Table.Color or C3(1,1,1)) | |
635 | local TIME = (Table.Time or 45) | |
636 | local SOUNDID = (Table.SoundID or nil) | |
637 | local SOUNDPITCH = (Table.SoundPitch or nil) | |
638 | local SOUNDVOLUME = (Table.SoundVolume or nil) | |
639 | local USEBOOMERANGMATH = (Table.UseBoomerangMath or false) | |
640 | local BOOMERANG = (Table.Boomerang or 0) | |
641 | local SIZEBOOMERANG = (Table.SizeBoomerang or 0) | |
642 | coroutine.resume(coroutine.create(function() | |
643 | local PLAYSSOUND = false | |
644 | local SOUND = nil | |
645 | local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true) | |
646 | if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then | |
647 | PLAYSSOUND = true | |
648 | SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false) | |
649 | end | |
650 | EFFECT.Color = COLOR | |
651 | local MSH = nil | |
652 | if TYPE == "Sphere" then | |
653 | MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0)) | |
654 | elseif TYPE == "Block" or TYPE == "Box" then | |
655 | MSH = IT("BlockMesh",EFFECT) | |
656 | MSH.Scale = SIZE | |
657 | elseif TYPE == "Wave" then | |
658 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8)) | |
659 | elseif TYPE == "Ring" then | |
660 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0)) | |
661 | elseif TYPE == "Slash" then | |
662 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0)) | |
663 | elseif TYPE == "Round Slash" then | |
664 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0)) | |
665 | elseif TYPE == "Swirl" then | |
666 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "168892432", "", SIZE, VT(0,0,0)) | |
667 | elseif TYPE == "Skull" then | |
668 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0)) | |
669 | elseif TYPE == "Crystal" then | |
670 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0)) | |
671 | end | |
672 | if MSH ~= nil then | |
673 | local BOOMR1 = 1+BOOMERANG/50 | |
674 | local BOOMR2 = 1+SIZEBOOMERANG/50 | |
675 | local MOVESPEED = nil | |
676 | if MOVEDIRECTION ~= nil then | |
677 | if USEBOOMERANGMATH == true then | |
678 | MOVESPEED = ((CFRAME.p - MOVEDIRECTION).Magnitude/TIME)*BOOMR1 | |
679 | else | |
680 | MOVESPEED = ((CFRAME.p - MOVEDIRECTION).Magnitude/TIME) | |
681 | end | |
682 | end | |
683 | local GROWTH = nil | |
684 | if USEBOOMERANGMATH == true then | |
685 | GROWTH = (SIZE - ENDSIZE)*(BOOMR2+1) | |
686 | else | |
687 | GROWTH = (SIZE - ENDSIZE) | |
688 | end | |
689 | local TRANS = TRANSPARENCY - ENDTRANSPARENCY | |
690 | if TYPE == "Block" then | |
691 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
692 | else | |
693 | EFFECT.CFrame = CFRAME | |
694 | end | |
695 | if USEBOOMERANGMATH == true then | |
696 | for LOOP = 1, TIME+1 do | |
697 | Swait() | |
698 | MSH.Scale = MSH.Scale - (VT((GROWTH.X)*((1 - (LOOP/TIME)*BOOMR2)),(GROWTH.Y)*((1 - (LOOP/TIME)*BOOMR2)),(GROWTH.Z)*((1 - (LOOP/TIME)*BOOMR2)))*BOOMR2)/TIME | |
699 | if TYPE == "Wave" then | |
700 | MSH.Offset = VT(0,0,-MSH.Scale.Z/8) | |
701 | end | |
702 | EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME | |
703 | if TYPE == "Block" then | |
704 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
705 | else | |
706 | EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3)) | |
707 | end | |
708 | if MOVEDIRECTION ~= nil then | |
709 | local ORI = EFFECT.Orientation | |
710 | EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-(MOVESPEED)*((1 - (LOOP/TIME)*BOOMR1))) | |
711 | EFFECT.CFrame = CF(EFFECT.Position)*ANGLES(RAD(ORI.X),RAD(ORI.Y),RAD(ORI.Z)) | |
712 | end | |
713 | end | |
714 | else | |
715 | for LOOP = 1, TIME+1 do | |
716 | Swait() | |
717 | MSH.Scale = MSH.Scale - GROWTH/TIME | |
718 | if TYPE == "Wave" then | |
719 | MSH.Offset = VT(0,0,-MSH.Scale.Z/8) | |
720 | end | |
721 | EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME | |
722 | if TYPE == "Block" then | |
723 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
724 | else | |
725 | EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3)) | |
726 | end | |
727 | if MOVEDIRECTION ~= nil then | |
728 | local ORI = EFFECT.Orientation | |
729 | EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED) | |
730 | EFFECT.CFrame = CF(EFFECT.Position)*ANGLES(RAD(ORI.X),RAD(ORI.Y),RAD(ORI.Z)) | |
731 | end | |
732 | end | |
733 | end | |
734 | EFFECT.Transparency = 1 | |
735 | if PLAYSSOUND == false then | |
736 | EFFECT:remove() | |
737 | else | |
738 | repeat Swait() until EFFECT:FindFirstChildOfClass("Sound") == nil | |
739 | EFFECT:remove() | |
740 | end | |
741 | else | |
742 | if PLAYSSOUND == false then | |
743 | EFFECT:remove() | |
744 | else | |
745 | repeat Swait() until EFFECT:FindFirstChildOfClass("Sound") == nil | |
746 | EFFECT:remove() | |
747 | end | |
748 | end | |
749 | end)) | |
750 | end | |
751 | ||
752 | function MakeForm(PART,TYPE) | |
753 | if TYPE == "Cyl" then | |
754 | local MSH = IT("CylinderMesh",PART) | |
755 | elseif TYPE == "Ball" then | |
756 | local MSH = IT("SpecialMesh",PART) | |
757 | MSH.MeshType = "Sphere" | |
758 | elseif TYPE == "Wedge" then | |
759 | local MSH = IT("SpecialMesh",PART) | |
760 | MSH.MeshType = "Wedge" | |
761 | end | |
762 | end | |
763 | ||
764 | Debris = game:GetService("Debris") | |
765 | ||
766 | function CastProperRay(StartPos, EndPos, Distance, Ignore) | |
767 | local DIRECTION = CF(StartPos,EndPos).lookVector | |
768 | return Raycast(StartPos, DIRECTION, Distance, Ignore) | |
769 | end | |
770 | ||
771 | function OhnoItsAShotgun() | |
772 | local SHOOTgun = CreatePart(3, Effects, "Fabric", 0, 1, BRICKC("white"), "OhNoItsAShotgun", VT(0.25, 0.5, 5), true) | |
773 | CreateMesh("SpecialMesh", SHOOTgun, "FileMesh", "1047997", "1047998", VT(0.9, 1.13, 1), VT(0,-0.3,0)) | |
774 | return SHOOTgun | |
775 | end | |
776 | ||
777 | function CamShake(SHAKE,TIMER) | |
778 | coroutine.resume(coroutine.create(function() | |
779 | local FADER = SHAKE/TIMER | |
780 | for i = 1, TIMER do | |
781 | wait() | |
782 | Humanoid.CameraOffset = VT(MRANDOM(-(SHAKE-(FADER*i)),(SHAKE-(FADER*i)))/10,MRANDOM(-(SHAKE-(FADER*i)),(SHAKE-(FADER*i)))/10,MRANDOM(-(SHAKE-(FADER*i)),(SHAKE-(FADER*i)))/10) | |
783 | end | |
784 | Humanoid.CameraOffset = VT(0,0,0) | |
785 | end)) | |
786 | end | |
787 | ||
788 | --//=================================\\ | |
789 | --|| GUIS AND MISC | |
790 | --\\=================================// | |
791 | ||
792 | local SKILLTEXTCOLOR = C3(1,1,1) | |
793 | local SKILLFONT = "SciFi" | |
794 | local SKILLTEXTSIZE = 4 | |
795 | ||
796 | local ATTACKS = {"Conjour - C","Aerial Bombardament - V","Point Blank - B","Tripwire - F","Mend - M"} | |
797 | ||
798 | for i = 1, #ATTACKS do | |
799 | local SKILLFRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.74, 0, 0.97-(0.04*i), 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill Frame") | |
800 | local SKILLTEXT = CreateLabel(SKILLFRAME, "["..ATTACKS[i].."]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Skill text") | |
801 | SKILLTEXT.TextXAlignment = "Right" | |
802 | SKILLTEXT.Rotation = i*3 | |
803 | end | |
804 | ||
805 | local BMUSIC = IT("Sound",RootPart) | |
806 | local VOLUME = 3 | |
807 | local PITCH = 1 | |
808 | local SONGID = 1248976746 | |
809 | ||
810 | local HEALTHBAR = CreateFrame(WEAPONGUI, 0.5, 1, UD2(1-0.20, 0, 0.75, 0), UD2(0.20, 0, 0.02, 0), C3(0,0,0), C3(0, 0, 0),"Health Bar") | |
811 | local HEALTHCOVER = CreateFrame(HEALTHBAR, 0, 0, UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), BRICKC"Shamrock".Color, C3(0, 0, 0),"Health Cover") | |
812 | local HEALTHTEXT = CreateLabel(HEALTHBAR, Humanoid.Health.."/"..Humanoid.MaxHealth, SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "HP") | |
813 | Character.Health:remove() | |
814 | HEALTHBAR.Rotation = (#ATTACKS*3)+3 | |
815 | local WHOAMI = CreateFrame(WEAPONGUI, 1, 1, UD2(1-0.26, 0, 0.69, 0), UD2(0.26, 0, 0.02, 0), C3(0,0,0), C3(0, 0, 0),"Ban") | |
816 | WHOAMI.Rotation = (#ATTACKS*3)+3 | |
817 | CreateLabel(WHOAMI, "Gunjourer", SKILLTEXTCOLOR, SKILLTEXTSIZE+4, SKILLFONT, 0, 2, 0, "Yes") | |
818 | ||
819 | Humanoid.MaxHealth = 450 | |
820 | Humanoid.Health = 450 | |
821 | ||
822 | Humanoid.Died:Connect(function() | |
823 | RootPart:remove() | |
824 | CreateSound(1218390070, Head, 4, 1, false) | |
825 | BMUSIC:remove() | |
826 | Effects:remove() | |
827 | WEAPONGUI:remove() | |
828 | end) | |
829 | local GRUNTS = {1218390070,1218390070,1218390070} | |
830 | ||
831 | --//=================================\\ | |
832 | --|| DAMAGING | |
833 | --\\=================================// | |
834 | ||
835 | function ApplyDamage(Humanoid,Damage) | |
836 | Damage = Damage * DAMAGEMULTIPLIER | |
837 | if Humanoid.Health < 2000 then | |
838 | if Humanoid.Health - Damage > 0 then | |
839 | Humanoid.Health = Humanoid.Health - Damage | |
840 | else | |
841 | Humanoid.Parent:BreakJoints() | |
842 | end | |
843 | else | |
844 | Humanoid.Parent:BreakJoints() | |
845 | end | |
846 | end | |
847 | ||
848 | function PAW_HAHA(LOC,AIMTO,OUCH) | |
849 | WACKYEFFECT({Time = 25, EffectType = "Block", Size = VT(0,0,0), Size2 = VT(1.4,1.4,1.4), Transparency = 0, Transparency2 = 1, CFrame = CF(LOC), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"New Yeller".Color, SoundID = 1218390070, SoundPitch = MRANDOM(8,12)/13, SoundVolume = 2}) | |
850 | for i = 1, 4 do | |
851 | local POS1 = CF(LOC,AIMTO)*CF(0,0,-45).p | |
852 | local AIMPOS = CF(LOC,POS1) * CF(0,0,-45) * ANGLES(RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360)))*CF(0,0,MRANDOM(5,75)/10).p | |
853 | local HIT,POS = CastProperRay(LOC,AIMPOS,1000,Character) | |
854 | local DISTANCE = (POS - LOC).Magnitude | |
855 | if HIT then | |
856 | local HUM = nil | |
857 | if HIT.Parent:FindFirstChildOfClass("Humanoid") then | |
858 | HUM = HIT.Parent:FindFirstChildOfClass("Humanoid") | |
859 | elseif HIT.Parent.Parent:FindFirstChildOfClass("Humanoid") then | |
860 | HUM = HIT.Parent.Parent:FindFirstChildOfClass("Humanoid") | |
861 | end | |
862 | if HUM then | |
863 | ApplyDamage(HUM,OUCH+MRANDOM(-3,3)) | |
864 | end | |
865 | end | |
866 | WACKYEFFECT({Time = 20, EffectType = "Block", Size = VT(0,0,0), Size2 = VT(1,1,1), Transparency = 0, Transparency2 = 1, CFrame = CF(POS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"New Yeller".Color, SoundID = nil, SoundPitch = 1, SoundVolume = 4}) | |
867 | WACKYEFFECT({Time = 20, EffectType = "Box", Size = VT(0,0,DISTANCE), Size2 = VT(0.7,0.7,DISTANCE), Transparency = 0.6, Transparency2 = 1, CFrame = CF(LOC,POS)*CF(0,0,-DISTANCE/2), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"New Yeller".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil}) | |
868 | end | |
869 | end | |
870 | ||
871 | --//=================================\\ | |
872 | --|| ATTACK FUNCTIONS AND STUFF | |
873 | --\\=================================// | |
874 | ||
875 | function Conjour() | |
876 | local SHOOT = OhnoItsAShotgun() | |
877 | local CFRAME = CF(RootPart.Position) * ANGLES(RAD(0), RAD(MRANDOM(0,360)), RAD(0))*CF(0,MRANDOM(15,25)/3,MRANDOM(15,25)/3) | |
878 | local ORI = 90 | |
879 | SHOOT.CFrame = CF(CFRAME.p,Mouse.Hit.p) * ANGLES(RAD(0), RAD(ORI), RAD(0)) | |
880 | local GOODRIDDANCE = false | |
881 | CreateSound(1218390070, SHOOT, 2, (MRANDOM(8,12)/10)+0.3, false) | |
882 | coroutine.resume(coroutine.create(function() | |
883 | repeat | |
884 | SHOOT.CFrame = Clerp(SHOOT.CFrame,CF(CFRAME.p,Mouse.Hit.p) * ANGLES(RAD(ORI), RAD(0), RAD(0)),0.25) | |
885 | Swait() | |
886 | until GOODRIDDANCE == true | |
887 | SHOOT.CFrame = SHOOT.CFrame * ANGLES(RAD(45), RAD(0), RAD(0)) | |
888 | SHOOT.CanCollide = true | |
889 | SHOOT.Anchored = false | |
890 | SHOOT.Parent = workspace | |
891 | local bv = Instance.new("BodyVelocity",SHOOT) | |
892 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
893 | bv.velocity = CF(SHOOT.Position,SHOOT.CFrame*CF(0,2.5,2).p).lookVector*45 | |
894 | Debris:AddItem(bv,0.1) | |
895 | wait(5) | |
896 | for i = 1, 45 do | |
897 | Swait() | |
898 | SHOOT.Transparency = SHOOT.Transparency + 1/45 | |
899 | end | |
900 | SHOOT:remove() | |
901 | end)) | |
902 | for i = 1, 15 do | |
903 | Swait() | |
904 | SHOOT.Transparency = SHOOT.Transparency - 1/15 | |
905 | ORI = ORI - 3 | |
906 | end | |
907 | for i = 1, 15 do | |
908 | Swait() | |
909 | ORI = ORI - 3 | |
910 | end | |
911 | wait(MRANDOM(2,8)/10) | |
912 | PAW_HAHA(SHOOT.CFrame*CF(0,0,-SHOOT.Size.Z/2).p,Mouse.Hit.p,14) | |
913 | CamShake(4,4) | |
914 | GOODRIDDANCE = true | |
915 | end | |
916 | function Aerial_Bombardament() | |
917 | local HITFLOOR,HITPOS = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character) | |
918 | if HITFLOOR then | |
919 | ATTACK = true | |
920 | Rooted = true | |
921 | local bv = Instance.new("BodyVelocity") | |
922 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
923 | bv.velocity = CF(RootPart.Position,RootPart.CFrame*CF(0,1.5,-2).p).lookVector*175 | |
924 | bv.Parent = RootPart | |
925 | local GYRO = IT("BodyGyro",RootPart) | |
926 | GYRO.D = 2 | |
927 | GYRO.P = 20000 | |
928 | GYRO.MaxTorque = VT(0,4000000,0) | |
929 | GYRO.CFrame = CF(RootPart.Position,RootPart.CFrame*CF(0,0,-5).p) | |
930 | CreateSound(1218390070,Torso,10,0.85,false) | |
931 | for i=0, 0.05, 0.1 / Animation_Speed do | |
932 | Swait() | |
933 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(65), RAD(0), RAD(-10)), 1 / Animation_Speed) | |
934 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-35), RAD(0), RAD(10)), 1 / Animation_Speed) | |
935 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(50), RAD(-20), RAD(25)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
936 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(15), RAD(20), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
937 | if ANIM == "Fall" or ANIM == "Jump" then | |
938 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.4, -0.6) * ANGLES(RAD(1), RAD(90), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
939 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
940 | else | |
941 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(-5), RAD(80), RAD(0)) * ANGLES(RAD(-4), RAD(0), RAD(0)), 1 / Animation_Speed) | |
942 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed) | |
943 | end | |
944 | end | |
945 | bv:Remove() | |
946 | local E = 360/15 | |
947 | for i = 1, 15 do | |
948 | Swait() | |
949 | WACKYEFFECT({Time = 10, EffectType = "Wave", Size = VT(8,1,8), Size2 = VT(2,15,2), Transparency = 0.9, Transparency2 = 1, CFrame = CF(RootPart.Position,HITPOS) * ANGLES(RAD(-90), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0}) | |
950 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(i*E), RAD(0), RAD(0)), 2 / Animation_Speed) | |
951 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25), RAD(0), RAD(0)), 1 / Animation_Speed) | |
952 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(5), RAD(15), RAD(90)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
953 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(-5), RAD(-90)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
954 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.4, -0.6) * ANGLES(RAD(-35), RAD(90), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
955 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
956 | end | |
957 | WACKYEFFECT({EffectType = "Sphere", Size = VT(5,5,5), Size2 = VT(20,20,20), Transparency = 0.5, Transparency2 = 1, CFrame = CF(Torso.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(17/255,17/255,17/255), SoundID = nil, SoundPitch = nil, SoundVolume = nil, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0}) | |
958 | for i = 1, 15 do | |
959 | coroutine.resume(coroutine.create(function() | |
960 | Conjour() | |
961 | end)) | |
962 | end | |
963 | local LANDED = nil | |
964 | local POS = nil | |
965 | coroutine.resume(coroutine.create(function() | |
966 | repeat | |
967 | Swait() | |
968 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(-15), RAD(0), RAD(0)), 1 / Animation_Speed) | |
969 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed) | |
970 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-35 - 4 * COS(SINE / 6)), RAD(0), RAD(45 + 10 * COS(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
971 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-35 - 4 * COS(SINE / 6)), RAD(0), RAD(-45 - 10 * COS(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
972 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.3, -0.7) * ANGLES(RAD(-25 + 5 * SIN(SINE / 12)), RAD(90), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
973 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.8, -0.3) * ANGLES(RAD(-10), RAD(-80), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
974 | until LANDED ~= nil | |
975 | end)) | |
976 | repeat | |
977 | Swait() | |
978 | local HITFLOOR,HITPOS = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4.2, Character) | |
979 | if HITFLOOR then | |
980 | LANDED = HITFLOOR | |
981 | POS = HITPOS | |
982 | end | |
983 | until LANDED ~= nil | |
984 | GYRO:remove() | |
985 | CamShake(6,3) | |
986 | CreateSound(1218390070, Torso, 2, (MRANDOM(8,12)/10)+0.3, false) | |
987 | ATTACK = false | |
988 | Rooted = false | |
989 | end | |
990 | end | |
991 | function Point_Blank() | |
992 | ATTACK = true | |
993 | Rooted = true | |
994 | local HIT = nil | |
995 | local HUMAN = nil | |
996 | local ROOT = nil | |
997 | CreateSound(1218390070,Torso,10,0.85,false) | |
998 | for i=0, 0.5, 0.1 / Animation_Speed do | |
999 | Swait() | |
1000 | if HIT ~= nil then | |
1001 | break | |
1002 | end | |
1003 | for index, CHILD in pairs(workspace:GetDescendants()) do | |
1004 | if CHILD.ClassName == "Model" and CHILD ~= Character then | |
1005 | local HUM = CHILD:FindFirstChildOfClass("Humanoid") | |
1006 | if HUM then | |
1007 | local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso") | |
1008 | if TORSO and HUM.Health > 0 then | |
1009 | if (TORSO.Position - RootPart.CFrame*CF(0,0,-2).p).Magnitude <= 2 then | |
1010 | ROOT = TORSO | |
1011 | HUMAN = HUM | |
1012 | HIT = CHILD | |
1013 | end | |
1014 | end | |
1015 | end | |
1016 | end | |
1017 | end | |
1018 | RootPart.CFrame = Clerp(RootPart.CFrame, RootPart.CFrame, 0.07) * CF(0,0,-1) | |
1019 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.75) * ANGLES(RAD(45), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1020 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1021 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-45), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1022 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.5) * ANGLES(RAD(135), RAD(0), RAD(12)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1023 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(-10), RAD(80), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1024 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(-5), RAD(-80), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1025 | end | |
1026 | if HIT then | |
1027 | local bv = Instance.new("BodyVelocity") | |
1028 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
1029 | bv.velocity = CF(RootPart.Position,RootPart.CFrame*CF(0,1.5,2).p).lookVector*75 | |
1030 | bv.Parent = RootPart | |
1031 | Debris:AddItem(bv,0.1) | |
1032 | coroutine.resume(coroutine.create(function() | |
1033 | local GUNS = {} | |
1034 | for i = 1, 4 do | |
1035 | local SHOOT = OhnoItsAShotgun() | |
1036 | local CFRAME = CF(ROOT.Position) * ANGLES(RAD(0), RAD(MRANDOM(0,360)), RAD(0))*CF(0,MRANDOM(15,25)/3,MRANDOM(15,25)/3) | |
1037 | SHOOT.CFrame = CF(CFRAME.p,ROOT.Position) | |
1038 | CreateSound(1218390070, SHOOT, 2, (MRANDOM(8,12)/10)+0.3, false) | |
1039 | table.insert(GUNS,SHOOT) | |
1040 | end | |
1041 | for i = 1, 25 do | |
1042 | Swait() | |
1043 | for E = 1, #GUNS do | |
1044 | GUNS[E].Transparency = GUNS[E].Transparency - 1/25 | |
1045 | end | |
1046 | end | |
1047 | wait(0.1) | |
1048 | CamShake(8,15) | |
1049 | for E = 1, #GUNS do | |
1050 | local SHOOT = GUNS[E] | |
1051 | coroutine.resume(coroutine.create(function() | |
1052 | PAW_HAHA(SHOOT.CFrame*CF(0,0,-SHOOT.Size.Z/2).p,SHOOT.CFrame*CF(0,0,-15).p,17) | |
1053 | SHOOT.CFrame = SHOOT.CFrame * ANGLES(RAD(45), RAD(0), RAD(0)) | |
1054 | SHOOT.CanCollide = true | |
1055 | SHOOT.Anchored = false | |
1056 | SHOOT.Parent = workspace | |
1057 | local bv = Instance.new("BodyVelocity",SHOOT) | |
1058 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
1059 | bv.velocity = CF(SHOOT.Position,SHOOT.CFrame*CF(0,2.5,2).p).lookVector*45 | |
1060 | Debris:AddItem(bv,0.1) | |
1061 | wait(5) | |
1062 | for i = 1, 45 do | |
1063 | Swait() | |
1064 | SHOOT.Transparency = SHOOT.Transparency + 1/45 | |
1065 | end | |
1066 | end)) | |
1067 | wait() | |
1068 | end | |
1069 | end)) | |
1070 | CreateSound(GRUNTS[MRANDOM(1,#GRUNTS)], Torso, 6, 1.1, false) | |
1071 | for i=0, 1, 0.1 / Animation_Speed do | |
1072 | Swait() | |
1073 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0.1, -0.1) * ANGLES(RAD(-20), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1074 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1075 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1076 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1077 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(-10), RAD(80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1078 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(-10), RAD(-80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1079 | end | |
1080 | end | |
1081 | ATTACK = false | |
1082 | Rooted = false | |
1083 | end | |
1084 | function Tripwire() | |
1085 | ATTACK = true | |
1086 | Rooted = true | |
1087 | TRIPWIRE = true | |
1088 | coroutine.resume(coroutine.create(function() | |
1089 | repeat | |
1090 | Swait() | |
1091 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0.1, -0.1) * ANGLES(RAD(-10), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1092 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1093 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1, 0.5, -0.5) * ANGLES(RAD(0), RAD(0), RAD(-100)) * ANGLES(RAD(20), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1094 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-15), RAD(5), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1095 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(-10), RAD(80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1096 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(-10), RAD(-80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1097 | until ATTACK == false | |
1098 | end)) | |
1099 | local SHOOT = OhnoItsAShotgun() | |
1100 | local CFRAME = CF(-1.5,0,1.5) * ANGLES(RAD(0), RAD(45), RAD(0)) | |
1101 | SHOOT.CFrame = Torso.CFrame*CFRAME | |
1102 | coroutine.resume(coroutine.create(function() | |
1103 | repeat | |
1104 | SHOOT.CFrame = Clerp(SHOOT.CFrame,Torso.CFrame*CFRAME,0.1) | |
1105 | Swait() | |
1106 | until HOLD == true | |
1107 | TRIPWIRE = false | |
1108 | local LOC = SHOOT.CFrame*CF(0,3,0).p | |
1109 | for i = 1, 15 do | |
1110 | Swait() | |
1111 | SHOOT.Transparency = SHOOT.Transparency - 1/15 | |
1112 | SHOOT.CFrame = Clerp(SHOOT.CFrame,CF(LOC,Mouse.Hit.p),0.3) | |
1113 | end | |
1114 | SHOOT.Transparency = 0 | |
1115 | for i = 1, 2 do | |
1116 | Swait() | |
1117 | SHOOT.CFrame = Clerp(SHOOT.CFrame,CF(LOC,Mouse.Hit.p),0.5) | |
1118 | end | |
1119 | PAW_HAHA(SHOOT.CFrame*CF(0,0,-SHOOT.Size.Z/2).p,Mouse.Hit.p,10) | |
1120 | CamShake(8,9) | |
1121 | SHOOT.CFrame = SHOOT.CFrame * ANGLES(RAD(45), RAD(0), RAD(0)) | |
1122 | SHOOT.CanCollide = true | |
1123 | SHOOT.Anchored = false | |
1124 | SHOOT.Parent = workspace | |
1125 | local bv = Instance.new("BodyVelocity",SHOOT) | |
1126 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
1127 | bv.velocity = CF(SHOOT.Position,SHOOT.CFrame*CF(0,2.5,2).p).lookVector*45 | |
1128 | Debris:AddItem(bv,0.1) | |
1129 | wait(5) | |
1130 | for i = 1, 45 do | |
1131 | Swait() | |
1132 | SHOOT.Transparency = SHOOT.Transparency + 1/45 | |
1133 | end | |
1134 | end)) | |
1135 | CreateSound(1218390070, SHOOT, 1.2, (MRANDOM(8,12)/10)-0.3, false) | |
1136 | for i = 1, 15 do | |
1137 | Swait() | |
1138 | SHOOT.Transparency = SHOOT.Transparency - 1/150 | |
1139 | end | |
1140 | ATTACK = false | |
1141 | Rooted = false | |
1142 | end | |
1143 | function Mend() | |
1144 | if Humanoid.Health < Humanoid.MaxHealth - 150 then | |
1145 | ATTACK = true | |
1146 | Rooted = true | |
1147 | for i=0, 0.25, 0.1 / Animation_Speed do | |
1148 | Swait() | |
1149 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -1) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
1150 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-25)), 1 / Animation_Speed) | |
1151 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-5), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1152 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-5), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1153 | RightHip.C0 = Clerp(RightHip.C0, CF(1, 0.2, -1) * ANGLES(RAD(-25), RAD(90), RAD(0)) * ANGLES(RAD(-2), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1154 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1.5, -0.5) * ANGLES(RAD(-90), RAD(-90), RAD(0)) * ANGLES(RAD(-2), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1155 | end | |
1156 | local LOOP = 0 | |
1157 | repeat | |
1158 | LOOP = LOOP + 1 | |
1159 | Swait() | |
1160 | Humanoid.Health = Humanoid.Health + 1 | |
1161 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -1) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
1162 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1163 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1, 0.5, -0.4) * ANGLES(RAD(55), RAD(0), RAD(-45)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1164 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1, 0.5, -0.7 - 0.4 * SIN(LOOP / 4)) * ANGLES(RAD(50 + 25 * COS(LOOP / 4)), RAD(0), RAD(65)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1165 | RightHip.C0 = Clerp(RightHip.C0, CF(1, 0, -1) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1166 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1.5, -0.5) * ANGLES(RAD(-90), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1167 | until KEYHOLD == false or Humanoid.Health == Humanoid.MaxHealth | |
1168 | for i=0, 0.15, 0.1 / Animation_Speed do | |
1169 | Swait() | |
1170 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -1) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
1171 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-25)), 1 / Animation_Speed) | |
1172 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-5), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1173 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-5), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1174 | RightHip.C0 = Clerp(RightHip.C0, CF(1, 0.2, -1) * ANGLES(RAD(-25), RAD(90), RAD(0)) * ANGLES(RAD(-2), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1175 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1.5, -0.5) * ANGLES(RAD(-90), RAD(-90), RAD(0)) * ANGLES(RAD(-2), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1176 | end | |
1177 | ATTACK = false | |
1178 | Rooted = false | |
1179 | end | |
1180 | end | |
1181 | function Taunt() | |
1182 | ATTACK = true | |
1183 | Rooted = true | |
1184 | local L = CreateSound(657527128,Head,10,1,false) | |
1185 | L.EmitterSize = 25 | |
1186 | for i = 1, 20 do | |
1187 | Swait() | |
1188 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0.1, -0.1) * ANGLES(RAD(-10), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1189 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1190 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1, 0.5, -0.5) * ANGLES(RAD(0), RAD(0), RAD(-110)) * ANGLES(RAD(20), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1191 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1, 0.3, -0.35) * ANGLES(RAD(0), RAD(0), RAD(80)) * ANGLES(RAD(20), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1192 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(-10), RAD(80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1193 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(-10), RAD(-80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1194 | end | |
1195 | for i = 1, 40 do | |
1196 | Swait() | |
1197 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, -0.17, -0.075 + 0.1 * SIN(i / 3)) * ANGLES(RAD(5), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1198 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-3), RAD(15 * SIN(i / 1.5)), RAD(0)), 1 / Animation_Speed) | |
1199 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.45, 0.6 - 0.1 * SIN(i / 3), 0) * ANGLES(RAD(15), RAD(-5), RAD(120)) * ANGLES(RAD(0), RAD(180), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1200 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.45, 0.6 - 0.1 * SIN(i / 3), 0) * ANGLES(RAD(15), RAD(5), RAD(-120)) * ANGLES(RAD(0), RAD(180), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1201 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.1 * SIN(i / 3), 0) * ANGLES(RAD(5), RAD(80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1202 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.1 * SIN(i / 3), 0) * ANGLES(RAD(5), RAD(-80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1203 | end | |
1204 | ATTACK = false | |
1205 | Rooted = false | |
1206 | end | |
1207 | function DoubleJump() | |
1208 | ATTACK = true | |
1209 | Rooted = false | |
1210 | Torso.Velocity = Vector3.new(Torso.Velocity.X,125,Torso.Velocity.Z) | |
1211 | CreateSound(1218390070, Head, 4, 1, false) | |
1212 | CreateSound(1218390070, Torso, 2, 1, false) | |
1213 | local E = 360/12 | |
1214 | for i=1, 12 do | |
1215 | Swait() | |
1216 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(i*E), RAD(0), RAD(0)), 2.5 / Animation_Speed) | |
1217 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1218 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(-90)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed) | |
1219 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(90)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
1220 | RightHip.C0 = Clerp(RightHip.C0, CF(1, 0, -0.5) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed) | |
1221 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, 0, -0.5) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed) | |
1222 | end | |
1223 | ATTACK = false | |
1224 | Rooted = false | |
1225 | end | |
1226 | ||
1227 | --//=================================\\ | |
1228 | --|| ASSIGN THINGS TO KEYS | |
1229 | --\\=================================// | |
1230 | ||
1231 | function MouseDown(Mouse) | |
1232 | HOLD = true | |
1233 | if ATTACK == false then | |
1234 | end | |
1235 | end | |
1236 | ||
1237 | function MouseUp(Mouse) | |
1238 | HOLD = false | |
1239 | end | |
1240 | ||
1241 | local READYTODOUBLE = false | |
1242 | local DOUBLED = false | |
1243 | ||
1244 | function KeyDown(Key) | |
1245 | KEYHOLD = true | |
1246 | if Key == "c" and ATTACK == false then | |
1247 | Conjour() | |
1248 | end | |
1249 | ||
1250 | if Key == "v" and ATTACK == false then | |
1251 | Aerial_Bombardament() | |
1252 | end | |
1253 | ||
1254 | if Key == "b" and ATTACK == false then | |
1255 | Point_Blank() | |
1256 | end | |
1257 | ||
1258 | if Key == "f" and ATTACK == false and TRIPWIRE == false and ANIM == "Idle" then | |
1259 | Tripwire() | |
1260 | end | |
1261 | ||
1262 | if Key == "m" and ATTACK == false then | |
1263 | Mend() | |
1264 | end | |
1265 | ||
1266 | if Key == "t" and ATTACK == false then | |
1267 | Taunt() | |
1268 | end | |
1269 | ||
1270 | if string.byte(Key) == 32 and READYTODOUBLE == true and ATTACK == false and Humanoid.Jump == true and DOUBLED == false then | |
1271 | READYTODOUBLE = false | |
1272 | DOUBLED = true | |
1273 | DoubleJump() | |
1274 | end | |
1275 | end | |
1276 | ||
1277 | function KeyUp(Key) | |
1278 | KEYHOLD = false | |
1279 | end | |
1280 | ||
1281 | Mouse.Button1Down:connect(function(NEWKEY) | |
1282 | MouseDown(NEWKEY) | |
1283 | end) | |
1284 | Mouse.Button1Up:connect(function(NEWKEY) | |
1285 | MouseUp(NEWKEY) | |
1286 | end) | |
1287 | Mouse.KeyDown:connect(function(NEWKEY) | |
1288 | KeyDown(NEWKEY) | |
1289 | end) | |
1290 | Mouse.KeyUp:connect(function(NEWKEY) | |
1291 | KeyUp(NEWKEY) | |
1292 | end) | |
1293 | ||
1294 | --//=================================\\ | |
1295 | --\\=================================// | |
1296 | ||
1297 | function unanchor() | |
1298 | for _, c in pairs(Character:GetChildren()) do | |
1299 | if c:IsA("BasePart") and c ~= RootPart then | |
1300 | c.Anchored = false | |
1301 | end | |
1302 | end | |
1303 | if UNANCHOR == true then | |
1304 | RootPart.Anchored = false | |
1305 | else | |
1306 | RootPart.Anchored = true | |
1307 | end | |
1308 | end | |
1309 | ||
1310 | --//=================================\\ | |
1311 | --|| WRAP THE WHOLE SCRIPT UP | |
1312 | --\\=================================// | |
1313 | ||
1314 | Humanoid.Changed:connect(function(Jump) | |
1315 | if Jump == "Jump" and (Disable_Jump == true) then | |
1316 | Humanoid.Jump = false | |
1317 | elseif Jump == "Jump" and (Disable_Jump == false) and DOUBLED == false then | |
1318 | wait(0.1) | |
1319 | READYTODOUBLE = true | |
1320 | end | |
1321 | end) | |
1322 | ||
1323 | while true do | |
1324 | Swait() | |
1325 | script.Parent = WEAPONGUI | |
1326 | ANIMATE.Parent = nil | |
1327 | for _,v in next, Humanoid:GetPlayingAnimationTracks() do | |
1328 | v:Stop(); | |
1329 | end | |
1330 | SINE = SINE + CHANGE | |
1331 | local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude | |
1332 | local TORSOVERTICALVELOCITY = RootPart.Velocity.y | |
1333 | local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character) | |
1334 | local WALKSPEEDVALUE = 8 / (Humanoid.WalkSpeed / 16) | |
1335 | if ANIM == "Walk" and TORSOVELOCITY > 1 then | |
1336 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0.1 * COS(SINE / (WALKSPEEDVALUE/2))) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
1337 | Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
1338 | RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.25 * SIN(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10+50 * COS(SINE / WALKSPEEDVALUE))), 0.6 / Animation_Speed) | |
1339 | LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.25 * SIN(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-10+50 * COS(SINE / WALKSPEEDVALUE))), 0.6 / Animation_Speed) | |
1340 | elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then | |
1341 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1342 | Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1343 | RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.7 / Animation_Speed) | |
1344 | LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.7 / Animation_Speed) | |
1345 | end | |
1346 | if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then | |
1347 | ANIM = "Jump" | |
1348 | if ATTACK == false then | |
1349 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1350 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(-25), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1351 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-35), RAD(0), RAD(25 + 10 * COS(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1352 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-35), RAD(0), RAD(-25 - 10 * COS(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1353 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.4, -0.6) * ANGLES(RAD(1), RAD(90), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1354 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1355 | end | |
1356 | elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then | |
1357 | ANIM = "Fall" | |
1358 | if ATTACK == false then | |
1359 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1360 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1361 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(35 - 4 * COS(SINE / 6)), RAD(0), RAD(45 + 10 * COS(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1362 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(35 - 4 * COS(SINE / 6)), RAD(0), RAD(-45 - 10 * COS(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1363 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.3, -0.7) * ANGLES(RAD(-25 + 5 * SIN(SINE / 12)), RAD(90), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1364 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.8, -0.3) * ANGLES(RAD(-10), RAD(-80), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1365 | end | |
1366 | elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then | |
1367 | ANIM = "Idle" | |
1368 | DOUBLED = false | |
1369 | READYTODOUBLE = false | |
1370 | if ATTACK == false then | |
1371 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0.1, -0.1 + 0.05 * SIN(SINE / 12)) * ANGLES(RAD(-10), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1372 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5 - 2.5 * SIN(SINE / 12)), RAD(7 * COS(SINE / 24)), RAD(0)), 1 / Animation_Speed) | |
1373 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1, 0.5 + 0.05 * SIN(SINE / 12), -0.5) * ANGLES(RAD(0), RAD(0), RAD(-100)) * ANGLES(RAD(20), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1374 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1, 0.3 + 0.05 * SIN(SINE / 12), -0.35) * ANGLES(RAD(0), RAD(0), RAD(70)) * ANGLES(RAD(20), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1375 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(-10), RAD(80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1376 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(-10), RAD(-80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1377 | end | |
1378 | elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then | |
1379 | ANIM = "Walk" | |
1380 | DOUBLED = false | |
1381 | READYTODOUBLE = false | |
1382 | if ATTACK == false then | |
1383 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.05) * ANGLES(RAD(15), RAD(0), RAD(-7 * COS(SINE / (WALKSPEEDVALUE)))), 1 / Animation_Speed) | |
1384 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 1 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(7 * COS(SINE / (WALKSPEEDVALUE)))), 1 / Animation_Speed) | |
1385 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-15), RAD(-5), RAD(5)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1386 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-15), RAD(5), RAD(-5)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1387 | RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 / Animation_Speed) | |
1388 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 / Animation_Speed) | |
1389 | end | |
1390 | end | |
1391 | unanchor() | |
1392 | if Rooted == false then | |
1393 | Disable_Jump = false | |
1394 | Humanoid.WalkSpeed = Speed | |
1395 | elseif Rooted == true then | |
1396 | Disable_Jump = true | |
1397 | Humanoid.WalkSpeed = 0 | |
1398 | end | |
1399 | BMUSIC.SoundId = "rbxassetid://"..SONGID | |
1400 | BMUSIC.Looped = true | |
1401 | BMUSIC.Pitch = PITCH | |
1402 | BMUSIC.Volume = VOLUME | |
1403 | BMUSIC.Playing = true | |
1404 | if BMUSIC.Parent ~= RootPart then | |
1405 | BMUSIC = IT("Sound",RootPart) | |
1406 | end | |
1407 | Humanoid.Name = "NONHUM" | |
1408 | HEALTHCOVER:TweenSize(UD2(1 * (Humanoid.Health / Humanoid.MaxHealth), 0, 1, 0), "Out", "Quad", 0.1, 0.1) | |
1409 | HEALTHTEXT.Text = math.ceil(Humanoid.Health).."/"..Humanoid.MaxHealth | |
1410 | end | |
1411 | ||
1412 | --//=================================\\ | |
1413 | --\\=================================// | |
1414 | ||
1415 | ||
1416 | ||
1417 | ||
1418 | ||
1419 | --//====================================================\\-- | |
1420 | --|| END OF SCRIPT | |
1421 | --\\====================================================//-- |