SHOW:
|
|
- or go back to the newest paste.
| 1 | --https://github.com/Mokiros/roblox-FE-compatibility | |
| 2 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
| |
| 3 | local Player,game,owner = owner,game | |
| 4 | local RealPlayer = Player | |
| 5 | do | |
| 6 | print("FE Compatibility code V2 by Mokiros")
| |
| 7 | local RealPlayer = RealPlayer | |
| 8 | script.Parent = RealPlayer.Character | |
| 9 | ||
| 10 | --Fake event to make stuff like Mouse.KeyDown work | |
| 11 | local Disconnect_Function = function(this) | |
| 12 | this[1].Functions[this[2]] = nil | |
| 13 | end | |
| 14 | local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
| |
| 15 | local FakeEvent_Metatable = {__index={
| |
| 16 | Connect = function(this,f) | |
| 17 | local i = tostring(math.random(0,10000)) | |
| 18 | while this.Functions[i] do | |
| 19 | i = tostring(math.random(0,10000)) | |
| 20 | end | |
| 21 | this.Functions[i] = f | |
| 22 | return setmetatable({this,i},Disconnect_Metatable)
| |
| 23 | end | |
| 24 | }} | |
| 25 | FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect | |
| 26 | local function fakeEvent() | |
| 27 | return setmetatable({Functions={}},FakeEvent_Metatable)
| |
| 28 | end | |
| 29 | ||
| 30 | --Creating fake input objects with fake variables | |
| 31 | local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
| |
| 32 | FakeMouse.keyUp = FakeMouse.KeyUp | |
| 33 | FakeMouse.keyDown = FakeMouse.KeyDown | |
| 34 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
| |
| 35 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
| |
| 36 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
| |
| 37 | end} | |
| 38 | --Merged 2 functions into one by checking amount of arguments | |
| 39 | CAS.UnbindAction = CAS.BindAction | |
| 40 | ||
| 41 | --This function will trigger the events that have been :Connect()'ed | |
| 42 | local function TriggerEvent(self,ev,...) | |
| 43 | for _,f in pairs(self[ev].Functions) do | |
| 44 | f(...) | |
| 45 | end | |
| 46 | end | |
| 47 | FakeMouse.TriggerEvent = TriggerEvent | |
| 48 | UIS.TriggerEvent = TriggerEvent | |
| 49 | ||
| 50 | --Client communication | |
| 51 | local Event = Instance.new("RemoteEvent")
| |
| 52 | Event.Name = "UserInput_Event" | |
| 53 | Event.OnServerEvent:Connect(function(plr,io) | |
| 54 | if plr~=RealPlayer then return end | |
| 55 | FakeMouse.Target = io.Target | |
| 56 | FakeMouse.Hit = io.Hit | |
| 57 | if not io.isMouse then | |
| 58 | local b = io.UserInputState == Enum.UserInputState.Begin | |
| 59 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 60 | return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up") | |
| 61 | end | |
| 62 | if io.UserInputType == Enum.UserInputType.MouseButton2 then | |
| 63 | return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up") | |
| 64 | end | |
| 65 | for _,t in pairs(CAS.Actions) do | |
| 66 | for _,k in pairs(t.Keys) do | |
| 67 | if k==io.KeyCode then | |
| 68 | t.Function(t.Name,io.UserInputState,io) | |
| 69 | end | |
| 70 | end | |
| 71 | end | |
| 72 | FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
| 73 | UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false) | |
| 74 | end | |
| 75 | end) | |
| 76 | Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
| |
| 77 | local Mouse = owner:GetMouse() | |
| 78 | local UIS = game:GetService("UserInputService")
| |
| 79 | local input = function(io,RobloxHandled) | |
| 80 | if RobloxHandled then return end | |
| 81 | --Since InputObject is a client-side instance, we create and pass table instead | |
| 82 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
| |
| 83 | end | |
| 84 | UIS.InputBegan:Connect(input) | |
| 85 | UIS.InputEnded:Connect(input) | |
| 86 | local h,t | |
| 87 | --Give the server mouse data every second frame, but only if the values changed | |
| 88 | --If player is not moving their mouse, client won't fire events | |
| 89 | local HB = game:GetService("RunService").Heartbeat
| |
| 90 | while true do | |
| 91 | if h~=Mouse.Hit or t~=Mouse.Target then | |
| 92 | h,t=Mouse.Hit,Mouse.Target | |
| 93 | Event:FireServer({isMouse=true,Target=t,Hit=h})
| |
| 94 | end | |
| 95 | --Wait 2 frames | |
| 96 | for i=1,2 do | |
| 97 | HB:Wait() | |
| 98 | end | |
| 99 | end]==],script) | |
| 100 | ||
| 101 | ----Sandboxed game object that allows the usage of client-side methods and services | |
| 102 | --Real game object | |
| 103 | local RealGame = game | |
| 104 | ||
| 105 | --Metatable for fake service | |
| 106 | local FakeService_Metatable = {
| |
| 107 | __index = function(self,k) | |
| 108 | local s = rawget(self,"_RealService") | |
| 109 | if s then | |
| 110 | return typeof(s[k])=="function" | |
| 111 | and function(_,...)return s[k](s,...)end or s[k] | |
| 112 | end | |
| 113 | end, | |
| 114 | __newindex = function(self,k,v) | |
| 115 | local s = rawget(self,"_RealService") | |
| 116 | if s then s[k]=v end | |
| 117 | end | |
| 118 | } | |
| 119 | local function FakeService(t,RealService) | |
| 120 | t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService | |
| 121 | return setmetatable(t,FakeService_Metatable) | |
| 122 | end | |
| 123 | ||
| 124 | --Fake game object | |
| 125 | local FakeGame = {
| |
| 126 | GetService = function(self,s) | |
| 127 | return rawget(self,s) or RealGame:GetService(s) | |
| 128 | end, | |
| 129 | Players = FakeService({
| |
| 130 | LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
| |
| 131 | },"Players"), | |
| 132 | UserInputService = FakeService(UIS,"UserInputService"), | |
| 133 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
| 134 | RunService = FakeService({
| |
| 135 | _btrs = {},
| |
| 136 | RenderStepped = RealGame:GetService("RunService").Heartbeat,
| |
| 137 | BindToRenderStep = function(self,name,_,fun) | |
| 138 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
| 139 | end, | |
| 140 | UnbindFromRenderStep = function(self,name) | |
| 141 | self._btrs[name]:Disconnect() | |
| 142 | end, | |
| 143 | },"RunService") | |
| 144 | } | |
| 145 | rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer) | |
| 146 | FakeGame.service = FakeGame.GetService | |
| 147 | FakeService(FakeGame,game) | |
| 148 | --Changing owner to fake player object to support owner:GetMouse() | |
| 149 | game,owner = FakeGame,FakeGame.Players.LocalPlayer | |
| 150 | end | |
| 151 | ||
| 152 | --//====================================================\\-- | |
| 153 | --|| CREATED BY SHACKLUSTER | |
| 154 | --\\====================================================//-- | |
| 155 | ||
| 156 | ||
| 157 | ||
| 158 | wait(2) | |
| 159 | ||
| 160 | ||
| 161 | ||
| 162 | Player = game:GetService("Players").LocalPlayer
| |
| 163 | PlayerGui = Player.PlayerGui | |
| 164 | Cam = workspace.CurrentCamera | |
| 165 | Backpack = Player.Backpack | |
| 166 | Character = Player.Character | |
| 167 | Humanoid = Character.Humanoid | |
| 168 | Mouse = Player:GetMouse() | |
| 169 | RootPart = Character["HumanoidRootPart"] | |
| 170 | Torso = Character["Torso"] | |
| 171 | Head = Character["Head"] | |
| 172 | RightArm = Character["Right Arm"] | |
| 173 | LeftArm = Character["Left Arm"] | |
| 174 | RightLeg = Character["Right Leg"] | |
| 175 | LeftLeg = Character["Left Leg"] | |
| 176 | RootJoint = RootPart["RootJoint"] | |
| 177 | Neck = Torso["Neck"] | |
| 178 | RightShoulder = Torso["Right Shoulder"] | |
| 179 | LeftShoulder = Torso["Left Shoulder"] | |
| 180 | RightHip = Torso["Right Hip"] | |
| 181 | LeftHip = Torso["Left Hip"] | |
| 182 | if Character:FindFirstChild("Shirt") then
| |
| 183 | Character.Shirt:Destroy() | |
| 184 | end | |
| 185 | if Character:FindFirstChild("Pants") then
| |
| 186 | Character.Pants:Destroy() | |
| 187 | end | |
| 188 | local top = Instance.new("Shirt")
| |
| 189 | top.ShirtTemplate = "rbxassetid://764022882" | |
| 190 | local bottom = Instance.new("Pants")
| |
| 191 | bottom.PantsTemplate = "rbxassetid://129459076" | |
| 192 | top.Parent = Character | |
| 193 | bottom.Parent = Character | |
| 194 | q = Character:GetChildren() | |
| 195 | for u = 1, #q do | |
| 196 | if q[u].ClassName == "Accessory" then | |
| 197 | q[u]:Destroy() | |
| 198 | elseif q[u].ClassName == "CharacterMesh" then | |
| 199 | q[u]:Destroy() | |
| 200 | end | |
| 201 | end | |
| 202 | Head.face.Texture = "rbxassetid://1032441660" | |
| 203 | ||
| 204 | IT = Instance.new | |
| 205 | CF = CFrame.new | |
| 206 | VT = Vector3.new | |
| 207 | RAD = math.rad | |
| 208 | C3 = Color3.new | |
| 209 | UD2 = UDim2.new | |
| 210 | BRICKC = BrickColor.new | |
| 211 | ANGLES = CFrame.Angles | |
| 212 | EULER = CFrame.fromEulerAnglesXYZ | |
| 213 | COS = math.cos | |
| 214 | ACOS = math.acos | |
| 215 | SIN = math.sin | |
| 216 | ASIN = math.asin | |
| 217 | ABS = math.abs | |
| 218 | MRANDOM = math.random | |
| 219 | FLOOR = math.floor | |
| 220 | ||
| 221 | function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET) | |
| 222 | local NEWMESH = IT(MESH) | |
| 223 | if MESH == "SpecialMesh" then | |
| 224 | NEWMESH.MeshType = MESHTYPE | |
| 225 | if MESHID ~= "nil" and MESHID ~= "" then | |
| 226 | NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID | |
| 227 | end | |
| 228 | if TEXTUREID ~= "nil" and TEXTUREID ~= "" then | |
| 229 | NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID | |
| 230 | end | |
| 231 | end | |
| 232 | NEWMESH.Offset = OFFSET or VT(0, 0, 0) | |
| 233 | NEWMESH.Scale = SCALE | |
| 234 | NEWMESH.Parent = PARENT | |
| 235 | return NEWMESH | |
| 236 | end | |
| 237 | ||
| 238 | function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE) | |
| 239 | local NEWPART = IT("Part")
| |
| 240 | NEWPART.formFactor = FORMFACTOR | |
| 241 | NEWPART.Reflectance = REFLECTANCE | |
| 242 | NEWPART.Transparency = TRANSPARENCY | |
| 243 | NEWPART.CanCollide = false | |
| 244 | NEWPART.Locked = true | |
| 245 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
| 246 | NEWPART.Name = NAME | |
| 247 | NEWPART.Size = SIZE | |
| 248 | NEWPART.Position = Torso.Position | |
| 249 | NEWPART.Material = MATERIAL | |
| 250 | NEWPART:BreakJoints() | |
| 251 | NEWPART.Parent = PARENT | |
| 252 | return NEWPART | |
| 253 | end | |
| 254 | ||
| 255 | ||
| 256 | --//=================================\\ | |
| 257 | --|| CUSTOMIZATION | |
| 258 | --\\=================================// | |
| 259 | ||
| 260 | Class_Name = "Riho" | |
| 261 | Weapon_Name = "Wreckage" | |
| 262 | ||
| 263 | Custom_Colors = {
| |
| 264 | Custom_Color_1 = BRICKC("Institutional white"); --1st color for the weapon.
| |
| 265 | Custom_Color_2 = BRICKC("Institutional white"); --2nd color for the weapon.
| |
| 266 | ||
| 267 | Custom_Color_3 = BRICKC("Institutional white"); --Color for the abilities.
| |
| 268 | Custom_Color_4 = BRICKC("Institutional white"); --Color for the secondary bar.
| |
| 269 | Custom_Color_5 = BRICKC("Institutional white"); --Color for the mana bar.
| |
| 270 | Custom_Color_6 = BRICKC("Institutional white"); --Color for the health bar.
| |
| 271 | Custom_Color_7 = BRICKC("Institutional white"); --Color for the stun bar.
| |
| 272 | ||
| 273 | Custom_Color_8 = BRICKC("Institutional white"); --Background for the mana bar.
| |
| 274 | Custom_Color_9 = BRICKC("Institutional white"); --Background for the secondary mana bar.
| |
| 275 | Custom_Color_10 = BRICKC("Institutional white"); --Background for the stun bar.
| |
| 276 | Custom_Color_11 = BRICKC("Institutional white"); --Background for the health bar.
| |
| 277 | Custom_Color_12 = BRICKC("Institutional white"); --Background for the abilities.
| |
| 278 | } | |
| 279 | ||
| 280 | Mana_Bar_Background_Transparency = 0 --Transparency for the background of the mana bar. | |
| 281 | Secondary_Mana_Bar_Background_Transparency = 0 --Transparency for the background of the secondary mana bar. | |
| 282 | Health_Bar_Background_Transparency = 0 --Transparency for the background of the health bar. | |
| 283 | Stun_Bar_Background_Transparency = 0 --Transparency for the background of the stun bar. | |
| 284 | Ability_Background_Transparency = 0 --Transparency for the background of the abilities. | |
| 285 | Stat_Background_Transparency = 0 --Transparency for the background of the stats. | |
| 286 | ||
| 287 | Player_Size = 1 --Size of the player. | |
| 288 | Animation_Speed = 4 | |
| 289 | Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60) | |
| 290 | ||
| 291 | Enable_Gui = false --Enables or disables the Weapon Gui. Also functions as hiding or showing the Gui. | |
| 292 | Enable_Stats = false --Enables or disables stats. | |
| 293 | Put_Stats_In_Character = false --Places stats in Character. | |
| 294 | Enable_Stagger_Hit = false --Enables or disables staggering when hitting a hitbox of some sort. | |
| 295 | Play_Hitbox_Hit_Sound = true --Plays a hit sound when hitting a hitbox of some sort. | |
| 296 | Enable_Stagger = false --Enables or disables staggering. | |
| 297 | Enable_Stun = false --Enables or disables the stun mechanic. | |
| 298 | Enable_Abilities = false --Enables abilites with cooldowns and mana costs. | |
| 299 | Enable_Secondary_Bar = false --Enables the secondary mana bar, if true. | |
| 300 | ||
| 301 | Start_Equipped = true --Starts the player equipped with their weapon. | |
| 302 | Start_Equipped_With_Equipped_Animation = false --Used in conjunction with the above option. Starts your equip animation. | |
| 303 | Can_Equip_Or_Unequip = false --Enables or disables the ability to unequip or equip your weapon. | |
| 304 | Disable_Animator = true --Disables the Animator in the humanoid. | |
| 305 | Disable_Animate = true --Disables the Animate script in the character. | |
| 306 | Disable_Moving_Arms = false --Keeps the arms from moving around. | |
| 307 | Use_Motors_Instead_Of_Welds = false --Uses motors instead of welds to disable moving arms. | |
| 308 | Walkspeed_Depends_On_Movement_Value = false --Walkspeed depends on movement value. Self-explanatory. | |
| 309 | Disable_Jump = false --Disables jumping. | |
| 310 | Use_HopperBin = false --Uses a hopperbin to do things. | |
| 311 | ||
| 312 | Cooldown_1 = 0 --Cooldowns for abilites. | |
| 313 | Cooldown_2 = 0 | |
| 314 | Cooldown_3 = 0 | |
| 315 | Cooldown_4 = 0 | |
| 316 | Skill_1_Mana_Cost = 0 --How much mana is required to use the skill. | |
| 317 | Skill_2_Mana_Cost = 0 | |
| 318 | Skill_3_Mana_Cost = 0 | |
| 319 | Skill_4_Mana_Cost = 0 | |
| 320 | Max_Mana = 0 --Maximum amount of mana you can have. | |
| 321 | Max_Secondary_Mana = 0 --Maximum amount of secondary mana you can have. | |
| 322 | Mana_Name = "Mana" --Name for the mana bar. | |
| 323 | Secondary_Mana_Name = "Block" --Name for the secondary mana bar. | |
| 324 | Max_Stun = 1 --Maximum amount of stun you can have. | |
| 325 | Recover_Mana = 0 --How much mana you gain. | |
| 326 | Mana_Regen_Mode = "1" --Basically switches from one mana regen system to another. | |
| 327 | Secondary_Mana_Regen_Mode = "1" --Basically switches from one secondary mana regen system to another. | |
| 328 | Stun_Lose_Mode = "1" --Basically switches from one secondary stun loss system to another. | |
| 329 | Recover_Secondary_Mana = 0 --How much secondary mana you gain. | |
| 330 | Lose_Stun = 0 --How much stun you lose. | |
| 331 | Stun_Wait = 0 --Delay between losing stun. | |
| 332 | Mana_Wait = 0 --Delay between gaining mana. | |
| 333 | Secondary_Mana_Wait = 0 --Delay between gaining secondary mana. | |
| 334 | Menu_Update_Speed = 0 --How fast the Weapon Gui will update. | |
| 335 | Constant_Update = false --Removes the delay between updating the Weapon GUI. | |
| 336 | Show_Stats = false --Hides or shows stats. | |
| 337 | Stat_Offset = 0.74 --For cosmetic purposes. {0.74, 0.78}
| |
| 338 | ||
| 339 | --//=================================\\ | |
| 340 | --|| END OF CUSTOMIZATION | |
| 341 | --\\=================================// | |
| 342 | ||
| 343 | local function weldBetween(a, b) | |
| 344 | local weldd = Instance.new("ManualWeld")
| |
| 345 | weldd.Part0 = a | |
| 346 | weldd.Part1 = b | |
| 347 | weldd.C0 = CFrame.new() | |
| 348 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
| 349 | weldd.Parent = a | |
| 350 | return weldd | |
| 351 | end | |
| 352 | ||
| 353 | function createaccessory(attachmentpart,mesh,texture,scale,offset,color) | |
| 354 | local acs = Instance.new("Part")
| |
| 355 | acs.CanCollide = false | |
| 356 | acs.Anchored = false | |
| 357 | acs.Size = Vector3.new(0,0,0) | |
| 358 | acs.CFrame = attachmentpart.CFrame | |
| 359 | acs.Parent = Character | |
| 360 | acs.BrickColor = color | |
| 361 | local meshs = Instance.new("SpecialMesh")
| |
| 362 | meshs.MeshId = mesh | |
| 363 | meshs.TextureId = texture | |
| 364 | meshs.Parent = acs | |
| 365 | meshs.Scale = scale | |
| 366 | meshs.Offset = offset | |
| 367 | weldBetween(attachmentpart,acs) | |
| 368 | end | |
| 369 | ||
| 370 | function createbodypart(TYPE,COLOR,PART,OFFSET,SIZE) | |
| 371 | if TYPE == "Gem" then | |
| 372 | local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0)) | |
| 373 | acs.Anchored = false | |
| 374 | acs.CanCollide = false | |
| 375 | acs.CFrame = PART.CFrame | |
| 376 | local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "9756362", "", SIZE, OFFSET)
| |
| 377 | weldBetween(PART,acs) | |
| 378 | elseif TYPE == "Skull" then | |
| 379 | local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0)) | |
| 380 | acs.Anchored = false | |
| 381 | acs.CanCollide = false | |
| 382 | acs.CFrame = PART.CFrame | |
| 383 | local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "4770583", "", SIZE, OFFSET)
| |
| 384 | weldBetween(PART,acs) | |
| 385 | elseif TYPE == "Eye" then | |
| 386 | local acs = CreatePart(3, Character, "Neon", 0, 0, COLOR, "Part", VT(0,0,0)) | |
| 387 | acs.Anchored = false | |
| 388 | acs.CanCollide = false | |
| 389 | acs.CFrame = PART.CFrame | |
| 390 | local acs2 = CreateMesh("SpecialMesh", acs, "Sphere", "", "", SIZE, OFFSET)
| |
| 391 | weldBetween(PART,acs) | |
| 392 | end | |
| 393 | end | |
| 394 | ||
| 395 | --//=================================\\ | |
| 396 | --|| USEFUL VALUES | |
| 397 | --\\=================================// | |
| 398 | ||
| 399 | local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
| 400 | local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
| 401 | local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) | |
| 402 | local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) | |
| 403 | local CO1 = 0 | |
| 404 | local CO2 = 0 | |
| 405 | local CO3 = 0 | |
| 406 | local CO4 = 0 | |
| 407 | local CHANGEDEFENSE = 0 | |
| 408 | local CHANGEDAMAGE = 0 | |
| 409 | local CHANGEMOVEMENT = 0 | |
| 410 | local ANIM = "Idle" | |
| 411 | local ATTACK = false | |
| 412 | local EQUIPPED = false | |
| 413 | local HOLD = false | |
| 414 | local COMBO = 1 | |
| 415 | local LASTPOINT = nil | |
| 416 | local BLCF = nil | |
| 417 | local SCFR = nil | |
| 418 | local STAGGERHITANIM = false | |
| 419 | local STAGGERANIM = false | |
| 420 | local STUNANIM = false | |
| 421 | local CRITCHANCENUMBER = 0 | |
| 422 | local IDLENUMBER = 0 | |
| 423 | local DONUMBER = 0 | |
| 424 | local HANDIDLE = false | |
| 425 | local SINE = 0 | |
| 426 | local CHANGE = 2 / Animation_Speed | |
| 427 | local WALKINGANIM = false | |
| 428 | local WALK = 0 | |
| 429 | local DISABLEJUMPING = false | |
| 430 | local HASBEENBLOCKED = false | |
| 431 | local STUNDELAYNUMBER = 0 | |
| 432 | local MANADELAYNUMBER = 0 | |
| 433 | local SECONDARYMANADELAYNUMBER = 0 | |
| 434 | local ROBLOXIDLEANIMATION = IT("Animation")
| |
| 435 | ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation" | |
| 436 | ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571" | |
| 437 | --ROBLOXIDLEANIMATION.Parent = Humanoid | |
| 438 | local WEAPONGUI = IT("ScreenGui", nil)
| |
| 439 | WEAPONGUI.Name = "Weapon GUI" | |
| 440 | local WEAPONTOOL = IT("HopperBin", nil)
| |
| 441 | WEAPONTOOL.Name = Weapon_Name | |
| 442 | local Weapon = IT("Model")
| |
| 443 | Weapon.Name = Weapon_Name | |
| 444 | local Effects = IT("Folder", Weapon)
| |
| 445 | Effects.Name = "Effects" | |
| 446 | local ANIMATOR = Humanoid.Animator | |
| 447 | local ANIMATE = Character.Animate | |
| 448 | local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"}
| |
| 449 | local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"}
| |
| 450 | local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"}
| |
| 451 | local HITBLOCKSOUNDS = {"199148933", "199148947"}
| |
| 452 | ||
| 453 | --//=================================\\ | |
| 454 | --\\=================================// | |
| 455 | ||
| 456 | --//=================================\\ | |
| 457 | --|| STATS | |
| 458 | --\\=================================// | |
| 459 | ||
| 460 | if Character:FindFirstChild("Stats") ~= nil then
| |
| 461 | Character:FindFirstChild("Stats").Parent = nil
| |
| 462 | end | |
| 463 | ||
| 464 | local Stats = IT("Folder", nil)
| |
| 465 | Stats.Name = "Stats" | |
| 466 | local ChangeStat = IT("Folder", Stats)
| |
| 467 | ChangeStat.Name = "ChangeStat" | |
| 468 | local Defense = IT("NumberValue", Stats)
| |
| 469 | Defense.Name = "Defense" | |
| 470 | Defense.Value = 1 | |
| 471 | local Movement = IT("NumberValue", Stats)
| |
| 472 | Movement.Name = "Movement" | |
| 473 | Movement.Value = 1 | |
| 474 | local Damage = IT("NumberValue", Stats)
| |
| 475 | Damage.Name = "Damage" | |
| 476 | Damage.Value = 1 | |
| 477 | local Mana = IT("NumberValue", Stats)
| |
| 478 | Mana.Name = "Mana" | |
| 479 | Mana.Value = 0 | |
| 480 | local SecondaryMana = IT("NumberValue", Stats)
| |
| 481 | SecondaryMana.Name = "SecondaryMana" | |
| 482 | SecondaryMana.Value = 0 | |
| 483 | local CanCrit = IT("BoolValue", Stats)
| |
| 484 | CanCrit.Name = "CanCrit" | |
| 485 | CanCrit.Value = false | |
| 486 | local CritChance = IT("NumberValue", Stats)
| |
| 487 | CritChance.Name = "CritChance" | |
| 488 | CritChance.Value = 20 | |
| 489 | local CanPenetrateArmor = IT("BoolValue", Stats)
| |
| 490 | CanPenetrateArmor.Name = "CanPenetrateArmor" | |
| 491 | CanPenetrateArmor.Value = false | |
| 492 | local AntiTeamKill = IT("BoolValue", Stats)
| |
| 493 | AntiTeamKill.Name = "AntiTeamKill" | |
| 494 | AntiTeamKill.Value = false | |
| 495 | local Rooted = IT("BoolValue", Stats)
| |
| 496 | Rooted.Name = "Rooted" | |
| 497 | Rooted.Value = false | |
| 498 | local Block = IT("BoolValue", Stats)
| |
| 499 | Block.Name = "Block" | |
| 500 | Block.Value = false | |
| 501 | local RecentEnemy = IT("ObjectValue", Stats)
| |
| 502 | RecentEnemy.Name = "RecentEnemy" | |
| 503 | RecentEnemy.Value = nil | |
| 504 | local StaggerHit = IT("BoolValue", Stats)
| |
| 505 | StaggerHit.Name = "StaggerHit" | |
| 506 | StaggerHit.Value = false | |
| 507 | local Stagger = IT("BoolValue", Stats)
| |
| 508 | Stagger.Name = "Stagger" | |
| 509 | Stagger.Value = false | |
| 510 | local Stun = IT("BoolValue", Stats)
| |
| 511 | Stun.Name = "Stun" | |
| 512 | Stun.Value = false | |
| 513 | local StunValue = IT("NumberValue", Stats)
| |
| 514 | StunValue.Name = "StunValue" | |
| 515 | StunValue.Value = 0 | |
| 516 | ||
| 517 | if Enable_Stats == true and Put_Stats_In_Character == true then | |
| 518 | Stats.Parent = Character | |
| 519 | end | |
| 520 | ||
| 521 | --//=================================\\ | |
| 522 | --\\=================================// | |
| 523 | ||
| 524 | ||
| 525 | ||
| 526 | ||
| 527 | ||
| 528 | --//=================================\\ | |
| 529 | --|| DEBUFFS / BUFFS | |
| 530 | --\\=================================// | |
| 531 | ||
| 532 | local DEFENSECHANGE1 = IT("NumberValue", ChangeStat)
| |
| 533 | DEFENSECHANGE1.Name = "ChangeDefense" | |
| 534 | DEFENSECHANGE1.Value = 0 | |
| 535 | ||
| 536 | local MOVEMENTCHANGE1 = IT("NumberValue", nil)
| |
| 537 | MOVEMENTCHANGE1.Name = "ChangeMovement" | |
| 538 | MOVEMENTCHANGE1.Value = 0 | |
| 539 | ||
| 540 | --//=================================\\ | |
| 541 | --\\=================================// | |
| 542 | ||
| 543 | ||
| 544 | ||
| 545 | ||
| 546 | ||
| 547 | --//=================================\\ | |
| 548 | --|| SAZERENOS' ARTIFICIAL HEARTBEAT | |
| 549 | --\\=================================// | |
| 550 | ||
| 551 | ArtificialHB = Instance.new("BindableEvent", script)
| |
| 552 | ArtificialHB.Name = "ArtificialHB" | |
| 553 | ||
| 554 | script:WaitForChild("ArtificialHB")
| |
| 555 | ||
| 556 | frame = Frame_Speed | |
| 557 | tf = 0 | |
| 558 | allowframeloss = false | |
| 559 | tossremainder = false | |
| 560 | lastframe = tick() | |
| 561 | script.ArtificialHB:Fire() | |
| 562 | ||
| 563 | game:GetService("RunService").Heartbeat:connect(function(s, p)
| |
| 564 | tf = tf + s | |
| 565 | if tf >= frame then | |
| 566 | if allowframeloss then | |
| 567 | script.ArtificialHB:Fire() | |
| 568 | lastframe = tick() | |
| 569 | else | |
| 570 | for i = 1, math.floor(tf / frame) do | |
| 571 | script.ArtificialHB:Fire() | |
| 572 | end | |
| 573 | lastframe = tick() | |
| 574 | end | |
| 575 | if tossremainder then | |
| 576 | tf = 0 | |
| 577 | else | |
| 578 | tf = tf - frame * math.floor(tf / frame) | |
| 579 | end | |
| 580 | end | |
| 581 | end) | |
| 582 | ||
| 583 | --//=================================\\ | |
| 584 | --\\=================================// | |
| 585 | ||
| 586 | BC = BrickColor.new | |
| 587 | createaccessory(Head,"http://www.roblox.com/asset/?id=13640868","http://www.roblox.com/asset/?id=13640869",Vector3.new(1,1,1),Vector3.new(0,0.5,0),BC(0,0,0)) | |
| 588 | ||
| 589 | ||
| 590 | --//=================================\\ | |
| 591 | --|| SOME FUNCTIONS | |
| 592 | --\\=================================// | |
| 593 | ||
| 594 | function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS) | |
| 595 | return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS) | |
| 596 | end | |
| 597 | ||
| 598 | function PositiveAngle(NUMBER) | |
| 599 | if NUMBER >= 0 then | |
| 600 | NUMBER = 0 | |
| 601 | end | |
| 602 | return NUMBER | |
| 603 | end | |
| 604 | ||
| 605 | function NegativeAngle(NUMBER) | |
| 606 | if NUMBER <= 0 then | |
| 607 | NUMBER = 0 | |
| 608 | end | |
| 609 | return NUMBER | |
| 610 | end | |
| 611 | ||
| 612 | function Swait(NUMBER) | |
| 613 | if NUMBER == 0 or NUMBER == nil then | |
| 614 | ArtificialHB.Event:wait() | |
| 615 | else | |
| 616 | for i = 1, NUMBER do | |
| 617 | ArtificialHB.Event:wait() | |
| 618 | end | |
| 619 | end | |
| 620 | end | |
| 621 | ||
| 622 | function QuaternionFromCFrame(cf) | |
| 623 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
| 624 | local trace = m00 + m11 + m22 | |
| 625 | if trace > 0 then | |
| 626 | local s = math.sqrt(1 + trace) | |
| 627 | local recip = 0.5 / s | |
| 628 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
| 629 | else | |
| 630 | local i = 0 | |
| 631 | if m11 > m00 then | |
| 632 | i = 1 | |
| 633 | end | |
| 634 | if m22 > (i == 0 and m00 or m11) then | |
| 635 | i = 2 | |
| 636 | end | |
| 637 | if i == 0 then | |
| 638 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
| 639 | local recip = 0.5 / s | |
| 640 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
| 641 | elseif i == 1 then | |
| 642 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
| 643 | local recip = 0.5 / s | |
| 644 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
| 645 | elseif i == 2 then | |
| 646 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
| 647 | local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
| 648 | end | |
| 649 | end | |
| 650 | end | |
| 651 | ||
| 652 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
| 653 | local xs, ys, zs = x + x, y + y, z + z | |
| 654 | local wx, wy, wz = w * xs, w * ys, w * zs | |
| 655 | local xx = x * xs | |
| 656 | local xy = x * ys | |
| 657 | local xz = x * zs | |
| 658 | local yy = y * ys | |
| 659 | local yz = y * zs | |
| 660 | local zz = z * zs | |
| 661 | 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)) | |
| 662 | end | |
| 663 | ||
| 664 | function QuaternionSlerp(a, b, t) | |
| 665 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
| 666 | local startInterp, finishInterp; | |
| 667 | if cosTheta >= 0.0001 then | |
| 668 | if (1 - cosTheta) > 0.0001 then | |
| 669 | local theta = ACOS(cosTheta) | |
| 670 | local invSinTheta = 1 / SIN(theta) | |
| 671 | startInterp = SIN((1 - t) * theta) * invSinTheta | |
| 672 | finishInterp = SIN(t * theta) * invSinTheta | |
| 673 | else | |
| 674 | startInterp = 1 - t | |
| 675 | finishInterp = t | |
| 676 | end | |
| 677 | else | |
| 678 | if (1 + cosTheta) > 0.0001 then | |
| 679 | local theta = ACOS(-cosTheta) | |
| 680 | local invSinTheta = 1 / SIN(theta) | |
| 681 | startInterp = SIN((t - 1) * theta) * invSinTheta | |
| 682 | finishInterp = SIN(t * theta) * invSinTheta | |
| 683 | else | |
| 684 | startInterp = t - 1 | |
| 685 | finishInterp = t | |
| 686 | end | |
| 687 | end | |
| 688 | 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 | |
| 689 | end | |
| 690 | ||
| 691 | function Clerp(a, b, t) | |
| 692 | local qa = {QuaternionFromCFrame(a)}
| |
| 693 | local qb = {QuaternionFromCFrame(b)}
| |
| 694 | local ax, ay, az = a.x, a.y, a.z | |
| 695 | local bx, by, bz = b.x, b.y, b.z | |
| 696 | local _t = 1 - t | |
| 697 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
| 698 | end | |
| 699 | ||
| 700 | function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME) | |
| 701 | local frame = IT("Frame")
| |
| 702 | frame.BackgroundTransparency = TRANSPARENCY | |
| 703 | frame.BorderSizePixel = BORDERSIZEPIXEL | |
| 704 | frame.Position = POSITION | |
| 705 | frame.Size = SIZE | |
| 706 | frame.BackgroundColor3 = COLOR | |
| 707 | frame.BorderColor3 = BORDERCOLOR | |
| 708 | frame.Name = NAME | |
| 709 | frame.Parent = PARENT | |
| 710 | return frame | |
| 711 | end | |
| 712 | ||
| 713 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
| 714 | local label = IT("TextLabel")
| |
| 715 | label.BackgroundTransparency = 1 | |
| 716 | label.Size = UD2(1, 0, 1, 0) | |
| 717 | label.Position = UD2(0, 0, 0, 0) | |
| 718 | label.TextColor3 = C3(255, 255, 255) | |
| 719 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
| 720 | label.TextTransparency = TRANSPARENCY | |
| 721 | label.FontSize = TEXTFONTSIZE | |
| 722 | label.Font = TEXTFONT | |
| 723 | label.BorderSizePixel = BORDERSIZEPIXEL | |
| 724 | label.TextScaled = true | |
| 725 | label.Text = TEXT | |
| 726 | label.Name = NAME | |
| 727 | label.Parent = PARENT | |
| 728 | return label | |
| 729 | end | |
| 730 | ||
| 731 | function NoOutlines(PART) | |
| 732 | PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10 | |
| 733 | end | |
| 734 | ||
| 735 | ||
| 736 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
| 737 | local NEWWELD = IT(TYPE) | |
| 738 | NEWWELD.Part0 = PART0 | |
| 739 | NEWWELD.Part1 = PART1 | |
| 740 | NEWWELD.C0 = C0 | |
| 741 | NEWWELD.C1 = C1 | |
| 742 | NEWWELD.Parent = PARENT | |
| 743 | return NEWWELD | |
| 744 | end | |
| 745 | ||
| 746 | function CreateSound(ID, PARENT, VOLUME, PITCH) | |
| 747 | coroutine.resume(coroutine.create(function() | |
| 748 | local NEWSOUND = IT("Sound", PARENT)
| |
| 749 | NEWSOUND.Volume = VOLUME | |
| 750 | NEWSOUND.Pitch = PITCH | |
| 751 | NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID | |
| 752 | Swait() | |
| 753 | NEWSOUND:play() | |
| 754 | game:GetService("Debris"):AddItem(NEWSOUND, 10)
| |
| 755 | end)) | |
| 756 | end | |
| 757 | ||
| 758 | function CFrameFromTopBack(at, top, back) | |
| 759 | local right = top:Cross(back) | |
| 760 | 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) | |
| 761 | end | |
| 762 | ||
| 763 | function Lightning(POSITION1, POSITION2, MULTIPLIERTIME, LIGHTNINGDELAY, OFFSET, BRICKCOLOR, MATERIAL, SIZE, TRANSPARENCY, LASTINGTIME) | |
| 764 | local MAGNITUDE = (POSITION1 - POSITION2).magnitude | |
| 765 | local CURRENTPOSITION = POSITION1 | |
| 766 | local LIGHTNINGOFFSET = {-OFFSET, OFFSET}
| |
| 767 | coroutine.resume(coroutine.create(function() | |
| 768 | for i = 1, MULTIPLIERTIME do | |
| 769 | local LIGHTNINGPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR,"Effect", VT(SIZE * Player_Size, SIZE * Player_Size, MAGNITUDE / MULTIPLIERTIME)) | |
| 770 | LIGHTNINGPART.Anchored = true | |
| 771 | local LIGHTNINGOFFSET2 = VT(LIGHTNINGOFFSET[MRANDOM(1, 2)], LIGHTNINGOFFSET[MRANDOM(1, 2)], LIGHTNINGOFFSET[MRANDOM(1, 2)]) | |
| 772 | local LIGHTNINGPOSITION1 = CF(CURRENTPOSITION, POSITION2) * CF(0, 0, MAGNITUDE / MULTIPLIERTIME).p + LIGHTNINGOFFSET2 | |
| 773 | if MULTIPLIERTIME == i then | |
| 774 | local LIGHTNINGMAGNITUDE1 = (CURRENTPOSITION - POSITION2).magnitude | |
| 775 | LIGHTNINGPART.Size = VT(SIZE * Player_Size, SIZE * Player_Size, LIGHTNINGMAGNITUDE1) | |
| 776 | LIGHTNINGPART.CFrame = CF(CURRENTPOSITION, POSITION2) * CF(0, 0, -LIGHTNINGMAGNITUDE1 / 2) | |
| 777 | else | |
| 778 | LIGHTNINGPART.CFrame = CF(CURRENTPOSITION, LIGHTNINGPOSITION1) * CF(0, 0, MAGNITUDE / MULTIPLIERTIME / 2) | |
| 779 | end | |
| 780 | CURRENTPOSITION=LIGHTNINGPART.CFrame * CF(0, 0, MAGNITUDE / MULTIPLIERTIME / 2).p | |
| 781 | game.Debris:AddItem(LIGHTNINGPART, LASTINGTIME) | |
| 782 | coroutine.resume(coroutine.create(function() | |
| 783 | while LIGHTNINGPART.Transparency ~= 1 do | |
| 784 | --local StartTransparency = tra | |
| 785 | for i=0, 1, LASTINGTIME do | |
| 786 | Swait() | |
| 787 | LIGHTNINGPART.Transparency = LIGHTNINGPART.Transparency + (0.1 / LASTINGTIME) | |
| 788 | end | |
| 789 | end | |
| 790 | end)) | |
| 791 | Swait(LIGHTNINGDELAY / Animation_Speed) | |
| 792 | end | |
| 793 | end)) | |
| 794 | end | |
| 795 | ||
| 796 | function MagicBlock(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
| 797 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
| 798 | EFFECTPART.Anchored = true | |
| 799 | EFFECTPART.CFrame = CFRAME | |
| 800 | local EFFECTMESH = CreateMesh("BlockMesh", EFFECTPART, "", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
| |
| 801 | game:GetService("Debris"):AddItem(EFFECTPART, 10)
| |
| 802 | coroutine.resume(coroutine.create(function(PART, MESH) | |
| 803 | for i = 0, 1, delay do | |
| 804 | Swait() | |
| 805 | PART.CFrame = PART.CFrame * ROTATION | |
| 806 | PART.Transparency = i | |
| 807 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
| 808 | end | |
| 809 | PART.Parent = nil | |
| 810 | end), EFFECTPART, EFFECTMESH) | |
| 811 | end | |
| 812 | ||
| 813 | function MagicSphere(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
| 814 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
| 815 | EFFECTPART.Anchored = true | |
| 816 | EFFECTPART.CFrame = CFRAME | |
| 817 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "Sphere", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
| |
| 818 | game:GetService("Debris"):AddItem(EFFECTPART, 10)
| |
| 819 | coroutine.resume(coroutine.create(function(PART, MESH) | |
| 820 | for i = 0, 1, delay do | |
| 821 | Swait() | |
| 822 | PART.CFrame = PART.CFrame * ROTATION | |
| 823 | PART.Transparency = i | |
| 824 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
| 825 | end | |
| 826 | PART.Parent = nil | |
| 827 | end), EFFECTPART, EFFECTMESH) | |
| 828 | end | |
| 829 | ||
| 830 | function MagicCylinder(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
| 831 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
| 832 | EFFECTPART.Anchored = true | |
| 833 | EFFECTPART.CFrame = CFRAME | |
| 834 | local EFFECTMESH = CreateMesh("CylinderMesh", EFFECTPART, "", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
| |
| 835 | game:GetService("Debris"):AddItem(EFFECTPART, 10)
| |
| 836 | coroutine.resume(coroutine.create(function(PART, MESH) | |
| 837 | for i = 0, 1, delay do | |
| 838 | Swait() | |
| 839 | PART.CFrame = PART.CFrame * ROTATION | |
| 840 | PART.Transparency = i | |
| 841 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
| 842 | end | |
| 843 | PART.Parent = nil | |
| 844 | end), EFFECTPART, EFFECTMESH) | |
| 845 | end | |
| 846 | ||
| 847 | function MagicHead(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
| 848 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
| 849 | EFFECTPART.Anchored = true | |
| 850 | EFFECTPART.CFrame = CFRAME | |
| 851 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "Head", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
| |
| 852 | game:GetService("Debris"):AddItem(EFFECTPART, 10)
| |
| 853 | coroutine.resume(coroutine.create(function(PART, MESH) | |
| 854 | for i = 0, 1, delay do | |
| 855 | Swait() | |
| 856 | PART.CFrame = PART.CFrame * ROTATION | |
| 857 | PART.Transparency = i | |
| 858 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
| 859 | end | |
| 860 | PART.Parent = nil | |
| 861 | end), EFFECTPART, EFFECTMESH) | |
| 862 | end | |
| 863 | ||
| 864 | function MagicRing(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
| 865 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
| 866 | EFFECTPART.Anchored = true | |
| 867 | EFFECTPART.CFrame = CFRAME | |
| 868 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "3270017", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
| |
| 869 | game:GetService("Debris"):AddItem(EFFECTPART, 10)
| |
| 870 | coroutine.resume(coroutine.create(function(PART, MESH) | |
| 871 | for i = 0, 1, delay do | |
| 872 | Swait() | |
| 873 | PART.CFrame = PART.CFrame * ROTATION | |
| 874 | PART.Transparency = i | |
| 875 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
| 876 | end | |
| 877 | PART.Parent = nil | |
| 878 | end), EFFECTPART, EFFECTMESH) | |
| 879 | end | |
| 880 | ||
| 881 | function MagicWave(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
| 882 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
| 883 | EFFECTPART.Anchored = true | |
| 884 | EFFECTPART.CFrame = CFRAME | |
| 885 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "20329976", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), VT(0, 0, (-0.1 * Z1)) + (OFFSET * Player_Size))
| |
| 886 | game:GetService("Debris"):AddItem(EFFECTPART, 10)
| |
| 887 | coroutine.resume(coroutine.create(function(PART, MESH) | |
| 888 | for i = 0, 1, delay do | |
| 889 | Swait() | |
| 890 | PART.CFrame = PART.CFrame * ROTATION | |
| 891 | PART.Transparency = i | |
| 892 | MESH.Offset = VT(0, 0, (-0.1 * MESH.Scale.Z)) | |
| 893 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
| 894 | end | |
| 895 | PART.Parent = nil | |
| 896 | end), EFFECTPART, EFFECTMESH) | |
| 897 | end | |
| 898 | ||
| 899 | function MagicCrystal(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
| 900 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
| 901 | EFFECTPART.Anchored = true | |
| 902 | EFFECTPART.CFrame = CFRAME | |
| 903 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "9756362", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
| |
| 904 | game:GetService("Debris"):AddItem(EFFECTPART, 10)
| |
| 905 | coroutine.resume(coroutine.create(function(PART, MESH) | |
| 906 | for i = 0, 1, delay do | |
| 907 | Swait() | |
| 908 | PART.CFrame = PART.CFrame * ROTATION | |
| 909 | PART.Transparency = i | |
| 910 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
| 911 | end | |
| 912 | PART.Parent = nil | |
| 913 | end), EFFECTPART, EFFECTMESH) | |
| 914 | end | |
| 915 | ||
| 916 | function MagicSwirl(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
| 917 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
| 918 | EFFECTPART.Anchored = true | |
| 919 | EFFECTPART.CFrame = CFRAME | |
| 920 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1051557", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
| |
| 921 | game:GetService("Debris"):AddItem(EFFECTPART, 10)
| |
| 922 | coroutine.resume(coroutine.create(function(PART, MESH) | |
| 923 | for i = 0, 1, delay do | |
| 924 | Swait() | |
| 925 | PART.CFrame = PART.CFrame * ROTATION | |
| 926 | PART.Transparency = i | |
| 927 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
| 928 | end | |
| 929 | PART.Parent = nil | |
| 930 | end), EFFECTPART, EFFECTMESH) | |
| 931 | end | |
| 932 | ||
| 933 | function MagicSharpCone(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
| 934 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
| 935 | EFFECTPART.Anchored = true | |
| 936 | EFFECTPART.CFrame = CFRAME | |
| 937 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1778999", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
| |
| 938 | game:GetService("Debris"):AddItem(EFFECTPART, 10)
| |
| 939 | coroutine.resume(coroutine.create(function(PART, MESH) | |
| 940 | for i = 0, 1, delay do | |
| 941 | Swait() | |
| 942 | PART.CFrame = PART.CFrame * ROTATION | |
| 943 | PART.Transparency = i | |
| 944 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
| 945 | end | |
| 946 | PART.Parent = nil | |
| 947 | end), EFFECTPART, EFFECTMESH) | |
| 948 | end | |
| 949 | ||
| 950 | function MagicFlatCone(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
| 951 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
| 952 | EFFECTPART.Anchored = true | |
| 953 | EFFECTPART.CFrame = CFRAME | |
| 954 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1033714", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
| |
| 955 | game:GetService("Debris"):AddItem(EFFECTPART, 10)
| |
| 956 | coroutine.resume(coroutine.create(function(PART, MESH) | |
| 957 | for i = 0, 1, delay do | |
| 958 | Swait() | |
| 959 | PART.CFrame = PART.CFrame * ROTATION | |
| 960 | PART.Transparency = i | |
| 961 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
| 962 | end | |
| 963 | PART.Parent = nil | |
| 964 | end), EFFECTPART, EFFECTMESH) | |
| 965 | end | |
| 966 | ||
| 967 | function MagicSpikedCrown(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
| 968 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
| 969 | EFFECTPART.Anchored = true | |
| 970 | EFFECTPART.CFrame = CFRAME | |
| 971 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1323306", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
| |
| 972 | game:GetService("Debris"):AddItem(EFFECTPART, 10)
| |
| 973 | coroutine.resume(coroutine.create(function(PART, MESH) | |
| 974 | for i = 0, 1, delay do | |
| 975 | Swait() | |
| 976 | PART.CFrame = PART.CFrame * ROTATION | |
| 977 | PART.Transparency = i | |
| 978 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
| 979 | end | |
| 980 | PART.Parent = nil | |
| 981 | end), EFFECTPART, EFFECTMESH) | |
| 982 | end | |
| 983 | ||
| 984 | function MagicFlatCrown(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
| 985 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
| 986 | EFFECTPART.Anchored = true | |
| 987 | EFFECTPART.CFrame = CFRAME | |
| 988 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1078075", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
| |
| 989 | game:GetService("Debris"):AddItem(EFFECTPART, 10)
| |
| 990 | coroutine.resume(coroutine.create(function(PART, MESH) | |
| 991 | for i = 0, 1, delay do | |
| 992 | Swait() | |
| 993 | PART.CFrame = PART.CFrame * ROTATION | |
| 994 | PART.Transparency = i | |
| 995 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
| 996 | end | |
| 997 | PART.Parent = nil | |
| 998 | end), EFFECTPART, EFFECTMESH) | |
| 999 | end | |
| 1000 | ||
| 1001 | function MagicSkull(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
| 1002 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
| 1003 | EFFECTPART.Anchored = true | |
| 1004 | EFFECTPART.CFrame = CFRAME | |
| 1005 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "4770583", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
| |
| 1006 | game:GetService("Debris"):AddItem(EFFECTPART, 10)
| |
| 1007 | coroutine.resume(coroutine.create(function(PART, MESH) | |
| 1008 | for i = 0, 1, delay do | |
| 1009 | Swait() | |
| 1010 | PART.CFrame = PART.CFrame * ROTATION | |
| 1011 | PART.Transparency = i | |
| 1012 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
| 1013 | end | |
| 1014 | PART.Parent = nil | |
| 1015 | end), EFFECTPART, EFFECTMESH) | |
| 1016 | end | |
| 1017 | ||
| 1018 | function ElectricEffect(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X, Y, Z, delay) | |
| 1019 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
| 1020 | EFFECTPART.Anchored = true | |
| 1021 | EFFECTPART.CFrame = CFRAME | |
| 1022 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "4770583", "", VT(X * Player_Size, Y * Player_Size, Z * Player_Size), OFFSET * Player_Size)
| |
| 1023 | game:GetService("Debris"):AddItem(EFFECTPART, 10)
| |
| 1024 | local XVALUE = MRANDOM() | |
| 1025 | local YVALUE = MRANDOM() | |
| 1026 | local ZVALUE = MRANDOM() | |
| 1027 | coroutine.resume(coroutine.create(function(PART, MESH, THEXVALUE, THEYVALUE, THEZVALUE) | |
| 1028 | for i = 0, 1, delay do | |
| 1029 | Swait() | |
| 1030 | PART.CFrame = PART.CFrame * ROTATION | |
| 1031 | PART.Transparency = i | |
| 1032 | THEXVALUE = THEXVALUE - 0.1 * (delay * 10) | |
| 1033 | THEYVALUE = THEYVALUE - 0.1 * (delay * 10) | |
| 1034 | THEZVALUE = THEZVALUE - 0.1 * (delay * 10) | |
| 1035 | MESH.Scale = MESH.Scale + VT(THEXVALUE * Player_Size, THEYVALUE * Player_Size, THEZVALUE * Player_Size) | |
| 1036 | end | |
| 1037 | PART.Parent = nil | |
| 1038 | end), EFFECTPART, EFFECTMESH, XVALUE, YVALUE, ZVALUE) | |
| 1039 | end | |
| 1040 | ||
| 1041 | function TrailEffect(BRICKCOLOR, MATERIAL, CURRENTCFRAME, OLDCFRAME, MESHTYPE, REFLECTANCE, SIZE, ROTATION, X, Y, Z, delay) | |
| 1042 | local MAGNITUDECFRAME = (CURRENTCFRAME.p - OLDCFRAME.p).magnitude | |
| 1043 | if MAGNITUDECFRAME > (1 / 100) then | |
| 1044 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT(1, MAGNITUDECFRAME, 1)) | |
| 1045 | EFFECTPART.Anchored = true | |
| 1046 | EFFECTPART.CFrame = CF((CURRENTCFRAME.p + OLDCFRAME.p) / 2, OLDCFRAME.p) * ANGLES(RAD(90), 0, 0) | |
| 1047 | local THEMESHTYPE = "BlockMesh" | |
| 1048 | if MESHTYPE == "Cylinder" then | |
| 1049 | THEMESHTYPE = "CylinderMesh" | |
| 1050 | end | |
| 1051 | local EFFECTMESH = CreateMesh(THEMESHTYPE, EFFECTPART, "", "", "", VT(0 + SIZE * Player_Size, 1, 0 + SIZE * Player_Size), VT(0, 0, 0)) | |
| 1052 | game:GetService("Debris"):AddItem(EFFECTPART, 10)
| |
| 1053 | coroutine.resume(coroutine.create(function(PART, MESH) | |
| 1054 | for i = 0, 1, delay do | |
| 1055 | Swait() | |
| 1056 | PART.CFrame = PART.CFrame * ROTATION | |
| 1057 | PART.Transparency = i | |
| 1058 | MESH.Scale = MESH.Scale + VT(X * Player_Size, Y * Player_Size, Z * Player_Size) | |
| 1059 | end | |
| 1060 | PART.Parent = nil | |
| 1061 | end), EFFECTPART, EFFECTMESH) | |
| 1062 | end | |
| 1063 | end | |
| 1064 | ||
| 1065 | function ClangEffect(BRICKCOLOR, MATERIAL, CFRAME, ANGLE, DURATION, SIZE, POWER, REFLECTANCE, X, Y, Z, delay) | |
| 1066 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 1, BRICKCOLOR, "Effect", VT()) | |
| 1067 | EFFECTPART.Anchored = true | |
| 1068 | EFFECTPART.CFrame = CFRAME | |
| 1069 | local EFFECTMESH = CreateMesh("BlockMesh", EFFECTPART, "", "", "", VT(0, 0, 0), VT(0, 0, 0))
| |
| 1070 | game:GetService("Debris"):AddItem(EFFECTPART, 10)
| |
| 1071 | local THELASTPOINT = CFRAME | |
| 1072 | coroutine.resume(coroutine.create(function(PART) | |
| 1073 | for i = 1, DURATION do | |
| 1074 | Swait() | |
| 1075 | PART.CFrame = PART.CFrame * ANGLES(RAD(ANGLE), 0, 0) * CF(0, POWER * Player_Size, 0) | |
| 1076 | TrailEffect(BRICKCOLOR, MATERIAL, PART.CFrame, THELASTPOINT, "Cylinder", REFLECTANCE, SIZE * Player_Size, ANGLES(0, 0, 0), X * Player_Size, Y * Player_Size, Z * Player_Size, delay) | |
| 1077 | THELASTPOINT = PART.CFrame | |
| 1078 | end | |
| 1079 | PART.Parent = nil | |
| 1080 | end), EFFECTPART) | |
| 1081 | end | |
| 1082 | ||
| 1083 | --local list={}
| |
| 1084 | function Triangle(Color, Material, a, b, c, delay) | |
| 1085 | local edge1 = (c - a):Dot((b - a).unit) | |
| 1086 | local edge2 = (a - b):Dot((c - b).unit) | |
| 1087 | local edge3 = (b - c):Dot((a - c).unit) | |
| 1088 | if edge1 <= (b - a).magnitude and edge1 >= 0 then | |
| 1089 | a, b, c=a, b, c | |
| 1090 | elseif edge2 <= (c - b).magnitude and edge2 >= 0 then | |
| 1091 | a, b, c=b, c, a | |
| 1092 | elseif edge3 <= (a - c).magnitude and edge3 >= 0 then | |
| 1093 | a, b, c=c, a, b | |
| 1094 | else | |
| 1095 | assert(false, "unreachable") | |
| 1096 | end | |
| 1097 | local len1 = (c - a):Dot((b - a).unit) | |
| 1098 | local len2 = (b - a).magnitude - len1 | |
| 1099 | local width = (a + (b - a).unit * len1 - c).magnitude | |
| 1100 | local maincf = CFrameFromTopBack(a, (b - a):Cross(c - b).unit, - (b - a).unit) | |
| 1101 | if len1 > 1 / 100 then | |
| 1102 | local sz = VT(0.2, width, len1) | |
| 1103 | local w1 = CreatePart(3, Effects, Material, 0, 0.5, Color, "Trail", sz) | |
| 1104 | local sp = CreateMesh("SpecialMesh", w1, "Wedge", "", "", VT(0, 1, 1) * sz / w1.Size, VT(0, 0, 0))
| |
| 1105 | w1.Anchored = true | |
| 1106 | w1.CFrame = maincf * ANGLES(math.pi, 0, math.pi / 2) * CF(0, width / 2, len1 / 2) | |
| 1107 | coroutine.resume(coroutine.create(function() | |
| 1108 | for i = 0.5, 1, delay * (2 / Animation_Speed) do | |
| 1109 | Swait() | |
| 1110 | w1.Transparency = i | |
| 1111 | end | |
| 1112 | w1.Parent = nil | |
| 1113 | end)) | |
| 1114 | game:GetService("Debris"):AddItem(w1, 10)
| |
| 1115 | --table.insert(list, w1) | |
| 1116 | end | |
| 1117 | if len2 > 1 / 100 then | |
| 1118 | local sz = VT(0.2, width, len2) | |
| 1119 | local w2 = CreatePart(3, Effects, Material, 0, 0.5, Color, "Trail", sz) | |
| 1120 | local sp = CreateMesh("SpecialMesh", w2, "Wedge", "", "", VT(0, 1, 1) * sz / w2.Size, VT(0, 0, 0))
| |
| 1121 | w2.Anchored = true | |
| 1122 | w2.CFrame = maincf * ANGLES(math.pi, math.pi, -math.pi / 2) * CF(0, width / 2, -len1 - len2 / 2) | |
| 1123 | coroutine.resume(coroutine.create(function() | |
| 1124 | for i = 0.5, 1, delay * (2 / Animation_Speed) do | |
| 1125 | Swait() | |
| 1126 | w2.Transparency = i | |
| 1127 | end | |
| 1128 | w2.Parent = nil | |
| 1129 | end)) | |
| 1130 | game:GetService("Debris"):AddItem(w2, 10)
| |
| 1131 | --table.insert(list, w2) | |
| 1132 | end | |
| 1133 | --return unpack(list) | |
| 1134 | end | |
| 1135 | ||
| 1136 | --[[Usage: | |
| 1137 | local Pos = Part | |
| 1138 | local Offset = Part.CFrame * CF(0, 0, 0) | |
| 1139 | local Color = "Institutional white" | |
| 1140 | local Material = "Neon" | |
| 1141 | local TheDelay = 0.01 | |
| 1142 | local Height = 4 | |
| 1143 | BLCF = Offset | |
| 1144 | if SCFR and (Pos.Position - SCFR.p).magnitude > 0.1 then | |
| 1145 | local a, b = Triangle(Color, Material, (SCFR * CF(0, Height / 2,0)).p, (SCFR * CF(0, -Height / 2, 0)).p, (BLCF * CF(0, Height / 2,0)).p, TheDelay) | |
| 1146 | if a then game:GetService("Debris"):AddItem(a, 1) end
| |
| 1147 | if b then game:GetService("Debris"):AddItem(b, 1) end
| |
| 1148 | local a, b = Triangle(Color, Material, (BLCF * CF(0, Height / 2, 0)).p, (BLCF * CF(0, -Height / 2, 0)).p, (SCFR * CF(0, -Height / 2, 0)).p, TheDelay) | |
| 1149 | if a then game:GetService("Debris"):AddItem(a, 1) end
| |
| 1150 | if b then game:GetService("Debris"):AddItem(b, 1) end
| |
| 1151 | SCFR = BLCF | |
| 1152 | elseif not SCFR then | |
| 1153 | SCFR = BLCF | |
| 1154 | end | |
| 1155 | -- | |
| 1156 | BLCF = nil | |
| 1157 | SCFR = nil | |
| 1158 | --]] | |
| 1159 | ||
| 1160 | --//=================================\\ | |
| 1161 | --\\=================================// | |
| 1162 | ||
| 1163 | ||
| 1164 | ||
| 1165 | ||
| 1166 | ||
| 1167 | --//=================================\\ | |
| 1168 | --|| RESIZE PLAYER | |
| 1169 | --\\=================================// | |
| 1170 | ||
| 1171 | if Player_Size ~= 1 then | |
| 1172 | RootPart.Size = RootPart.Size * Player_Size | |
| 1173 | Torso.Size = Torso.Size * Player_Size | |
| 1174 | Head.Size = Head.Size * Player_Size | |
| 1175 | RightArm.Size = RightArm.Size * Player_Size | |
| 1176 | LeftArm.Size = LeftArm.Size * Player_Size | |
| 1177 | RightLeg.Size = RightLeg.Size * Player_Size | |
| 1178 | LeftLeg.Size = LeftLeg.Size * Player_Size | |
| 1179 | RootJoint.Parent = RootPart | |
| 1180 | Neck.Parent = Torso | |
| 1181 | RightShoulder.Parent = Torso | |
| 1182 | LeftShoulder.Parent = Torso | |
| 1183 | RightHip.Parent = Torso | |
| 1184 | LeftHip.Parent = Torso | |
| 1185 | ||
| 1186 | RootJoint.C0 = ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
| 1187 | RootJoint.C1 = ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
| 1188 | Neck.C0 = NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
| 1189 | Neck.C1 = CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
| 1190 | RightShoulder.C0 = CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0 | |
| 1191 | LeftShoulder.C0 = CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0 | |
| 1192 | if Disable_Moving_Arms == false then | |
| 1193 | RightShoulder.C1 = ANGLES(0, RAD(90), 0) * CF(0 * Player_Size, 0.5 * Player_Size, -0.5) | |
| 1194 | LeftShoulder.C1 = ANGLES(0, RAD(-90), 0) * CF(0 * Player_Size, 0.5 * Player_Size, -0.5) | |
| 1195 | else | |
| 1196 | RightShoulder.C1 = CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) | |
| 1197 | LeftShoulder.C1 = CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) | |
| 1198 | end | |
| 1199 | RightHip.C0 = CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
| 1200 | LeftHip.C0 = CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
| 1201 | RightHip.C1 = CF(0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
| 1202 | LeftHip.C1 = CF(-0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
| 1203 | -------------------- | |
| 1204 | end | |
| 1205 | ||
| 1206 | ||
| 1207 | --//=================================\\ | |
| 1208 | --\\=================================// | |
| 1209 | ||
| 1210 | ||
| 1211 | ||
| 1212 | ||
| 1213 | --//=================================\\ | |
| 1214 | --|| WEAPON CREATION | |
| 1215 | --\\=================================// | |
| 1216 | ||
| 1217 | if Player_Size ~= 1 then | |
| 1218 | for _, v in pairs (Weapon:GetChildren()) do | |
| 1219 | if v.ClassName == "Motor" or v.ClassName == "Weld" or v.ClassName == "Snap" then | |
| 1220 | local p1 = v.Part1 | |
| 1221 | v.Part1 = nil | |
| 1222 | local cf1, cf2, cf3, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12 = v.C1:components() | |
| 1223 | v.C1 = CF(cf1 * Player_Size, cf2 * Player_Size, cf3 * Player_Size, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12) | |
| 1224 | v.Part1 = p1 | |
| 1225 | elseif v.ClassName == "Part" then | |
| 1226 | for _, b in pairs (v:GetChildren()) do | |
| 1227 | if b.ClassName == "SpecialMesh" or b.ClassName == "BlockMesh" then | |
| 1228 | b.Scale = VT(b.Scale.x * Player_Size, b.Scale.y * Player_Size, b.Scale.z * Player_Size) | |
| 1229 | end | |
| 1230 | end | |
| 1231 | end | |
| 1232 | end | |
| 1233 | end | |
| 1234 | ||
| 1235 | for _, c in pairs(Weapon:GetChildren()) do | |
| 1236 | if c.ClassName == "Part" then | |
| 1237 | c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0) | |
| 1238 | end | |
| 1239 | end | |
| 1240 | ||
| 1241 | Weapon.Parent = Character | |
| 1242 | ||
| 1243 | Humanoid.Died:connect(function() | |
| 1244 | ATTACK = true | |
| 1245 | end) | |
| 1246 | ||
| 1247 | print(Class_Name.." loaded.") | |
| 1248 | ||
| 1249 | --//=================================\\ | |
| 1250 | --\\=================================// | |
| 1251 | ||
| 1252 | ||
| 1253 | ||
| 1254 | ||
| 1255 | ||
| 1256 | --//=================================\\ | |
| 1257 | --|| DAMAGE FUNCTIONS | |
| 1258 | --\\=================================// | |
| 1259 | ||
| 1260 | function StatLabel(LABELTYPE, CFRAME, TEXT, COLOR) | |
| 1261 | local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT()) | |
| 1262 | STATPART.CFrame = CF(CFRAME.p + VT(0, 1.5, 0)) | |
| 1263 | local BODYGYRO = IT("BodyGyro", STATPART)
| |
| 1264 | local BODYPOSITION = IT("BodyPosition", STATPART)
| |
| 1265 | BODYPOSITION.P = 2000 | |
| 1266 | BODYPOSITION.D = 100 | |
| 1267 | BODYPOSITION.maxForce = VT(math.huge, math.huge, math.huge) | |
| 1268 | if LABELTYPE == "Normal" then | |
| 1269 | BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 6, MRANDOM(-2, 2)) | |
| 1270 | elseif LABELTYPE == "Debuff" then | |
| 1271 | BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 8, MRANDOM(-2, 2)) | |
| 1272 | elseif LABELTYPE == "Interruption" then | |
| 1273 | BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2,2), 8, MRANDOM(-2, 2)) | |
| 1274 | end | |
| 1275 | game:GetService("Debris"):AddItem(STATPART ,5)
| |
| 1276 | local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
| |
| 1277 | BILLBOARDGUI.Adornee = STATPART | |
| 1278 | BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0) | |
| 1279 | BILLBOARDGUI.StudsOffset = VT(-2, 2, 0) | |
| 1280 | BILLBOARDGUI.AlwaysOnTop = false | |
| 1281 | local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
| |
| 1282 | TEXTLABEL.BackgroundTransparency = 1 | |
| 1283 | TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0) | |
| 1284 | TEXTLABEL.Text = TEXT | |
| 1285 | TEXTLABEL.Font = "SourceSans" | |
| 1286 | TEXTLABEL.FontSize="Size42" | |
| 1287 | TEXTLABEL.TextColor3 = COLOR | |
| 1288 | TEXTLABEL.TextStrokeTransparency = 0 | |
| 1289 | TEXTLABEL.TextScaled = true | |
| 1290 | TEXTLABEL.TextWrapped = true | |
| 1291 | coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL) | |
| 1292 | wait(0.2) | |
| 1293 | for i=1, 5 do | |
| 1294 | wait() | |
| 1295 | THEBODYPOSITION.Position = THEPART.Position - VT(0, 0.5 ,0) | |
| 1296 | end | |
| 1297 | wait(1.2) | |
| 1298 | for i=1, 5 do | |
| 1299 | wait() | |
| 1300 | THETEXTLABEL.TextTransparency = THETEXTLABEL.TextTransparency + 0.2 | |
| 1301 | THETEXTLABEL.TextStrokeTransparency = THETEXTLABEL.TextStrokeTransparency + 0.2 | |
| 1302 | THEBODYPOSITION.position = THEPART.Position + VT(0, 0.5, 0) | |
| 1303 | end | |
| 1304 | THEPART.Parent = nil | |
| 1305 | end),STATPART, BODYPOSITION, TEXTLABEL) | |
| 1306 | end | |
| 1307 | ||
| 1308 | function IncreaseOrDecreaseStat(LOCATION, STAT, AMOUNT, DURATION, SHOWTHESTAT) | |
| 1309 | if LOCATION:FindFirstChild("Stats") ~= nil then
| |
| 1310 | if LOCATION.Stats:FindFirstChild("Block") ~= nil then
| |
| 1311 | if LOCATION.Stats:FindFirstChild("Block").Value == true then
| |
| 1312 | return | |
| 1313 | end | |
| 1314 | end | |
| 1315 | if LOCATION.Stats:FindFirstChild("ChangeStat") ~= nil and LOCATION.Stats:FindFirstChild("Block").Value == false then
| |
| 1316 | local NewStatChange = IT("NumberValue")
| |
| 1317 | NewStatChange.Value = AMOUNT | |
| 1318 | if STAT == "Defense" then | |
| 1319 | NewStatChange.Name = "ChangeDefense" | |
| 1320 | elseif STAT == "Damage" then | |
| 1321 | NewStatChange.Name = "ChangeDamage" | |
| 1322 | elseif STAT == "Movement" then | |
| 1323 | NewStatChange.Name = "ChangeMovement" | |
| 1324 | end | |
| 1325 | if SHOWTHESTAT == true then | |
| 1326 | if AMOUNT < 0 then | |
| 1327 | StatLabel("Debuff", LOCATION.Head.CFrame * CF(0, 0 + (LOCATION.Head.Size.z - 1), 0), "-"..STAT, C3(1, 1, 1))
| |
| 1328 | elseif AMOUNT > 0 then | |
| 1329 | StatLabel("Debuff", LOCATION.Head.CFrame * CF(0, 0 + (LOCATION.Head.Size.z - 1), 0), "+"..STAT, C3(1, 1, 1))
| |
| 1330 | end | |
| 1331 | end | |
| 1332 | if DURATION ~= nil and DURATION ~= 0 then | |
| 1333 | local StatDuration = IT("NumberValue")
| |
| 1334 | StatDuration.Name = "Duration" | |
| 1335 | StatDuration.Value = DURATION | |
| 1336 | StatDuration.Parent = NewStatChange | |
| 1337 | end | |
| 1338 | NewStatChange.Parent = LOCATION.Stats:FindFirstChild("ChangeStat")
| |
| 1339 | end | |
| 1340 | end | |
| 1341 | end | |
| 1342 | ||
| 1343 | --Usage: DamageFunction(HITWEAPONSOUNDS[MRANDOM(1, #HITWEAPONSOUNDS)], HITARMORSOUNDS[MRANDOM(1, #HITARMORSOUNDS)], HITBLOCKSOUNDS[MRANDOM(1, #HITBLOCKSOUNDS)], HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], 1, 1, 1, 1, hit, false, 5, 10, MRANDOM(5, 10), "Normal", Part, 0.5, false, true, 1, MRANDOM(5, 10), nil, true, false, nil, 0, 0, false) | |
| 1344 | function DamageFunction(HITWEAPONSOUND, HITARMORSOUND, HITBLOCKSOUND, HITPLAYERSOUND, HITWEAPONSOUNDPITCH, HITARMORSOUNDPITCH, HITBLOCKSOUNDPITCH, HITPLAYERSOUNDPITCH, HIT, HITEVENWHENDEAD, MINIMUMDAMAGE, MAXIMUMDAMAGE, KNOCKBACK, TYPE, PROPERTY, DELAY, KNOCKBACKTYPE, INCREASESTUN, STAGGER, STAGGERHIT, RANGED, DECREASETHESTAT, DECREASEAMOUNT, DECREASEDURATION, SHOWDECREASEDSTAT) | |
| 1345 | if HIT.Parent == nil then | |
| 1346 | return | |
| 1347 | end | |
| 1348 | local HITHUMANOID = HIT.Parent:FindFirstChild("Humanoid")
| |
| 1349 | for _, v in pairs(HIT.Parent:GetChildren()) do | |
| 1350 | if v:IsA("Humanoid") then
| |
| 1351 | HITHUMANOID = v | |
| 1352 | end | |
| 1353 | end | |
| 1354 | if HIT.Name == "Hitbox" and RANGED ~= true and HIT.Parent ~= Weapon and Enable_Stagger_Hit == true then | |
| 1355 | StaggerHit.Value = true | |
| 1356 | if Play_Hitbox_Hit_Sound == true then | |
| 1357 | if HITWEAPONSOUND ~= "" and HITWEAPONSOUND ~= "nil" then | |
| 1358 | CreateSound(HITWEAPONSOUND, HIT, 1, HITWEAPONSOUNDPITCH) | |
| 1359 | end | |
| 1360 | end | |
| 1361 | return | |
| 1362 | end | |
| 1363 | if HIT.Parent.Parent:FindFirstChild("Torso") ~= nil or HIT.Parent.Parent:FindFirstChild("UpperTorso") ~= nil then
| |
| 1364 | HITHUMANOID = HIT.Parent.Parent:FindFirstChild("Humanoid")
| |
| 1365 | end | |
| 1366 | if HIT.Parent.ClassName == "Hat" or HIT.ClassName == "Accessory" then | |
| 1367 | HIT = HIT.Parent.Parent:FindFirstChild("Head")
| |
| 1368 | end | |
| 1369 | if HITHUMANOID ~= nil and HIT.Parent.Name ~= Character.Name and (HIT.Parent:FindFirstChild("Torso") ~= nil or HIT.Parent:FindFirstChild("UpperTorso") ~= nil) then
| |
| 1370 | if HIT.Parent:FindFirstChild("DebounceHit") ~= nil then
| |
| 1371 | if HIT.Parent.DebounceHit.Value == true then | |
| 1372 | return | |
| 1373 | end | |
| 1374 | end | |
| 1375 | if AntiTeamKill.Value == true then | |
| 1376 | if Player.Neutral == false and game.Players:GetPlayerFromCharacter(HIT.Parent) ~= nil then | |
| 1377 | if game.Players:GetPlayerFromCharacter(HIT.Parent).TeamColor == Player.TeamColor then | |
| 1378 | return | |
| 1379 | end | |
| 1380 | end | |
| 1381 | end | |
| 1382 | if HITEVENWHENDEAD == false then | |
| 1383 | if HIT.Parent:FindFirstChild("Humanoid") ~= nil then
| |
| 1384 | if HIT.Parent:FindFirstChild("Humanoid").Health <= 0 then
| |
| 1385 | return | |
| 1386 | end | |
| 1387 | end | |
| 1388 | end | |
| 1389 | if HIT.Parent:FindFirstChild("Stats") ~= nil then
| |
| 1390 | if HIT.Parent.Stats:FindFirstChild("StunValue") ~= nil then
| |
| 1391 | HIT.Parent.Stats:FindFirstChild("StunValue").Value = HIT.Parent.Stats:FindFirstChild("StunValue").Value + INCREASESTUN
| |
| 1392 | end | |
| 1393 | end | |
| 1394 | if HIT.Parent:FindFirstChild("Stats") ~= nil then
| |
| 1395 | if HIT.Parent.Stats:FindFirstChild("Stagger") ~= nil then
| |
| 1396 | if STAGGER == true and Enable_Stagger == true then | |
| 1397 | HIT.Parent.Stats:FindFirstChild("Stagger").Value = true
| |
| 1398 | end | |
| 1399 | end | |
| 1400 | end | |
| 1401 | if HIT.Parent:FindFirstChild("Stats") ~= nil then
| |
| 1402 | if HIT.Parent.Stats:FindFirstChild("Block") ~= nil then
| |
| 1403 | if HIT.Parent.Stats:FindFirstChild("Block").Value == true then
| |
| 1404 | HASBEENBLOCKED = true | |
| 1405 | if HIT.Parent.Stats:FindFirstChild("Block"):FindFirstChild("BlockDebounce") == nil then
| |
| 1406 | StatLabel("Interruption", HIT.Parent.Head.CFrame * CF(0, 0 + (HIT.Parent.Head.Size.z - 1), 0), "Blocked!", C3(0, 100 / 255, 255 / 255))
| |
| 1407 | if RANGED ~= true then | |
| 1408 | if HITBLOCKSOUND ~= "" and HITBLOCKSOUND ~= "nil" then | |
| 1409 | CreateSound(HITBLOCKSOUND, HIT, 1, HITBLOCKSOUNDPITCH) | |
| 1410 | end | |
| 1411 | end | |
| 1412 | local BlockDebounce = IT("BoolValue", HIT.Parent.Stats:FindFirstChild("Block"))
| |
| 1413 | BlockDebounce.Name = "BlockDebounce" | |
| 1414 | BlockDebounce.Value = true | |
| 1415 | if RANGED ~= true then | |
| 1416 | game:GetService("Debris"):AddItem(BlockDebounce, 0.5)
| |
| 1417 | else | |
| 1418 | game:GetService("Debris"):AddItem(BlockDebounce, 0.1)
| |
| 1419 | end | |
| 1420 | end | |
| 1421 | if RANGED ~= true and Enable_Stagger == true then | |
| 1422 | HIT.Parent.Stats:FindFirstChild("Block").Value = false
| |
| 1423 | Stagger.Value = true | |
| 1424 | end | |
| 1425 | return | |
| 1426 | end | |
| 1427 | end | |
| 1428 | end | |
| 1429 | if DECREASETHESTAT ~= nil then | |
| 1430 | if HIT.Parent:FindFirstChild("Stats") ~= nil then
| |
| 1431 | IncreaseOrDecreaseStat(HIT.Parent, DECREASETHESTAT, DECREASEAMOUNT, DECREASEDURATION, SHOWDECREASEDSTAT) | |
| 1432 | end | |
| 1433 | end | |
| 1434 | local DAMAGE = MRANDOM(MINIMUMDAMAGE,MAXIMUMDAMAGE) * Damage.Value | |
| 1435 | if HIT.Parent:FindFirstChild("Stats") ~= nil then
| |
| 1436 | if HIT.Parent.Stats:FindFirstChild("Defense") ~= nil then
| |
| 1437 | if CanPenetrateArmor.Value == true then | |
| 1438 | DAMAGE = DAMAGE | |
| 1439 | else | |
| 1440 | DAMAGE = DAMAGE / HIT.Parent.Stats:FindFirstChild("Defense").Value
| |
| 1441 | end | |
| 1442 | elseif HIT.Parent.Stats:FindFirstChild("Defense") == nil then
| |
| 1443 | DAMAGE = DAMAGE | |
| 1444 | end | |
| 1445 | end | |
| 1446 | if CanCrit.Value == true then | |
| 1447 | CRITCHANCENUMBER = MRANDOM(1, CritChance.Value) | |
| 1448 | if CRITCHANCENUMBER == 1 then | |
| 1449 | DAMAGE = DAMAGE * 2 | |
| 1450 | end | |
| 1451 | end | |
| 1452 | DAMAGE = math.floor(DAMAGE) | |
| 1453 | if HASBEENBLOCKED == false then | |
| 1454 | HITHUMANOID.Health = HITHUMANOID.Health - DAMAGE | |
| 1455 | end | |
| 1456 | if DAMAGE <= 3 and HASBEENBLOCKED == false then | |
| 1457 | if STAGGERHIT == true and Enable_Stagger_Hit == true and RANGED ~= true then | |
| 1458 | StaggerHit.Value = true | |
| 1459 | end | |
| 1460 | if HITARMORSOUND ~= "" and HITARMORSOUND ~= "nil" then | |
| 1461 | CreateSound(HITARMORSOUND, HIT, 1, HITARMORSOUNDPITCH) | |
| 1462 | end | |
| 1463 | elseif DAMAGE > 3 and HASBEENBLOCKED == false then | |
| 1464 | if HITPLAYERSOUND ~= "" and HITPLAYERSOUND ~= "nil" then | |
| 1465 | CreateSound(HITPLAYERSOUND, HIT, 1, HITPLAYERSOUNDPITCH) | |
| 1466 | end | |
| 1467 | end | |
| 1468 | if DAMAGE > 3 and DAMAGE < 20 and HASBEENBLOCKED == false then | |
| 1469 | if CanCrit.Value == true and CRITCHANCENUMBER == 1 then | |
| 1470 | StatLabel("Normal", HIT.Parent.Head.CFrame * CF(0, 0 + (HIT.Parent.Head.Size.z - 1), 0), "Crit! \n"..DAMAGE, C3(200/255, 0, 0))
| |
| 1471 | CreateSound("296102734", HIT, 1, 1)
| |
| 1472 | else | |
| 1473 | StatLabel("Normal", HIT.Parent.Head.CFrame * CF(0, 0 + (HIT.Parent.Head.Size.z - 1), 0), DAMAGE, C3(255/255, 220/255, 0))
| |
| 1474 | end | |
| 1475 | elseif DAMAGE >= 20 and HASBEENBLOCKED == false then | |
| 1476 | if CanCrit.Value == true and CRITCHANCENUMBER == 1 then | |
| 1477 | StatLabel("Normal", HIT.Parent.Head.CFrame * CF(0, 0 + (HIT.Parent.Head.Size.z - 1), 0), "Crit! \n"..DAMAGE, C3(200/255, 0, 0))
| |
| 1478 | CreateSound("296102734", HIT, 1, 1)
| |
| 1479 | else | |
| 1480 | StatLabel("Normal", HIT.Parent.Head.CFrame * CF(0, 0 + (HIT.Parent.Head.Size.z - 1), 0), DAMAGE, C3(255/255, 0, 0))
| |
| 1481 | end | |
| 1482 | elseif DAMAGE <= 3 and HASBEENBLOCKED == false then | |
| 1483 | if CanCrit.Value == true and CRITCHANCENUMBER == 1 then | |
| 1484 | StatLabel("Normal", HIT.Parent.Head.CFrame * CF(0, 0 + (HIT.Parent.Head.Size.z - 1), 0), "Crit! \n"..DAMAGE, C3(200/255, 0, 0))
| |
| 1485 | CreateSound("296102734", HIT, 1, 1)
| |
| 1486 | else | |
| 1487 | StatLabel("Normal", HIT.Parent.Head.CFrame * CF(0, 0 + (HIT.Parent.Head.Size.z - 1), 0), DAMAGE, C3(225/255, 225/255, 225/255))
| |
| 1488 | end | |
| 1489 | end | |
| 1490 | if TYPE == "Normal" then | |
| 1491 | local vp = IT("BodyVelocity")
| |
| 1492 | vp.P=500 | |
| 1493 | vp.maxForce = VT(math.huge, 0, math.huge) | |
| 1494 | if KNOCKBACKTYPE == 1 then | |
| 1495 | vp.Velocity = PROPERTY.CFrame.lookVector * KNOCKBACK + PROPERTY.Velocity / 1.05 | |
| 1496 | elseif KNOCKBACKTYPE == 2 then | |
| 1497 | vp.Velocity = PROPERTY.CFrame.lookVector * KNOCKBACK | |
| 1498 | end | |
| 1499 | if KNOCKBACK > 0 and HASBEENBLOCKED == false then | |
| 1500 | vp.Parent = HIT--.Parent.Torso | |
| 1501 | end | |
| 1502 | game:GetService("Debris"):AddItem(vp, 0.5)
| |
| 1503 | end | |
| 1504 | HASBEENBLOCKED = false | |
| 1505 | RecentEnemy.Value = HIT.Parent | |
| 1506 | local DebounceHit = IT("BoolValue", HIT.Parent)
| |
| 1507 | DebounceHit.Name = "DebounceHit" | |
| 1508 | DebounceHit.Value = true | |
| 1509 | game:GetService("Debris"):AddItem(DebounceHit, DELAY)
| |
| 1510 | end | |
| 1511 | end | |
| 1512 | ||
| 1513 | --Usage: MagnitudeDamage(HITWEAPONSOUNDS[MRANDOM(1, #HITWEAPONSOUNDS)], HITARMORSOUNDS[MRANDOM(1, #HITARMORSOUNDS)], HITBLOCKSOUNDS[MRANDOM(1, #HITBLOCKSOUNDS)], HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], 1, 1, 1, 1, Part, 5, true, 5, 10, MRANDOM(5, 10), "Normal", Part, 0.5, false, true, 1, MRANDOM(5, 10), nil, true, false, nil, 0, 0, false) | |
| 1514 | function MagnitudeDamage(HITWEAPONSOUND, HITARMORSOUND, HITBLOCKSOUND, HITPLAYERSOUND, HITWEAPONSOUNDPITCH, HITARMORSOUNDPITCH, HITBLOCKSOUNDPITCH, HITPLAYERSOUNDPITCH, PART, MAGNITUDE, HITEVENWHENDEAD, MINIMUMDAMAGE, MAXIMUMDAMAGE, KNOCKBACK, TYPE, PROPERTY, DELAY, KNOCKBACKTYPE, INCREASESTUN, STAGGER, STAGGERHIT, RANGED, MAGNITUDEDECREASETHESTAT, MAGNITUDEDECREASEAMOUNT, MAGNITUDEDECREASEDURATION, MAGNITUDESHOWDECREASEDSTAT) | |
| 1515 | for _, c in pairs(workspace:GetChildren()) do | |
| 1516 | local HUMANOID = c:FindFirstChild("Humanoid")
| |
| 1517 | local HEAD = nil | |
| 1518 | if HUMANOID ~= nil then | |
| 1519 | for _, d in pairs(c:GetChildren()) do | |
| 1520 | if d.ClassName == "Model" and RANGED ~= true then | |
| 1521 | HEAD = d:FindFirstChild("Hitbox")
| |
| 1522 | if HEAD ~= nil then | |
| 1523 | local THEMAGNITUDE = (HEAD.Position - PART.Position).magnitude | |
| 1524 | if THEMAGNITUDE <= (MAGNITUDE * Player_Size) and c.Name ~= Player.Name then | |
| 1525 | if Play_Hitbox_Hit_Sound == true then | |
| 1526 | local HitRefpart = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT()) | |
| 1527 | HitRefpart.Anchored = true | |
| 1528 | HitRefpart.CFrame = CF(HEAD.Position) | |
| 1529 | CreateSound(HITWEAPONSOUND, HitRefpart, 1, HITWEAPONSOUNDPITCH) | |
| 1530 | end | |
| 1531 | if Enable_Stagger_Hit == true then | |
| 1532 | StaggerHit.Value = true | |
| 1533 | end | |
| 1534 | end | |
| 1535 | end | |
| 1536 | elseif d:IsA"BasePart" then | |
| 1537 | HEAD = d | |
| 1538 | if HEAD ~= nil then | |
| 1539 | local THEMAGNITUDE = (HEAD.Position - PART.Position).magnitude | |
| 1540 | if THEMAGNITUDE <= (MAGNITUDE * Player_Size) and c.Name ~= Player.Name then | |
| 1541 | DamageFunction(HITWEAPONSOUND, HITARMORSOUND, HITBLOCKSOUND, HITPLAYERSOUND, HITWEAPONSOUNDPITCH, HITARMORSOUNDPITCH, HITBLOCKSOUNDPITCH, HITPLAYERSOUNDPITCH, HEAD, HITEVENWHENDEAD, MINIMUMDAMAGE, MAXIMUMDAMAGE, KNOCKBACK, TYPE, PROPERTY, DELAY, KNOCKBACKTYPE, INCREASESTUN, STAGGER, STAGGERHIT, RANGED, MAGNITUDEDECREASETHESTAT, MAGNITUDEDECREASEAMOUNT, MAGNITUDEDECREASEDURATION, MAGNITUDESHOWDECREASEDSTAT) | |
| 1542 | end | |
| 1543 | end | |
| 1544 | end | |
| 1545 | end | |
| 1546 | end | |
| 1547 | end | |
| 1548 | end | |
| 1549 | ||
| 1550 | --Usage: MagnitudeBuffOrDebuff(Part, 5, "Defense", -0.1, 3, true, true) | |
| 1551 | function MagnitudeBuffOrDebuff(PART, MAGNITUDE, STAT, AMOUNT, DURATION, SHOWBUFFORDEBUFF, APPLYTOOTHERSINSTEAD) | |
| 1552 | if Player.Neutral == true then | |
| 1553 | IncreaseOrDecreaseStat(Character, STAT, AMOUNT, DURATION, SHOWBUFFORDEBUFF) | |
| 1554 | end | |
| 1555 | for _, c in pairs(workspace:GetChildren()) do | |
| 1556 | local HUMANOID = c:FindFirstChild("Humanoid")
| |
| 1557 | local THEHEAD = nil | |
| 1558 | if HUMANOID ~= nil then | |
| 1559 | if c:FindFirstChild("Torso") ~= nil then
| |
| 1560 | THEHEAD = c:FindFirstChild("Torso")
| |
| 1561 | elseif c:FindFirstChild("UpperTorso") ~= nil then
| |
| 1562 | THEHEAD = c:FindFirstChild("UpperTorso")
| |
| 1563 | end | |
| 1564 | if THEHEAD ~= nil then | |
| 1565 | local THEMAGNITUDE = (THEHEAD.Position - PART.Position).magnitude | |
| 1566 | print("yes 1")
| |
| 1567 | if APPLYTOOTHERSINSTEAD == true then | |
| 1568 | if THEMAGNITUDE <= (MAGNITUDE * Player_Size) and c.Name ~= Player.Name then | |
| 1569 | if Player.Neutral == false and game.Players:GetPlayerFromCharacter(THEHEAD.Parent) ~= nil then | |
| 1570 | if game.Players:GetPlayerFromCharacter(THEHEAD.Parent).TeamColor == Player.TeamColor then | |
| 1571 | IncreaseOrDecreaseStat(THEHEAD.Parent, STAT, AMOUNT, DURATION, SHOWBUFFORDEBUFF) | |
| 1572 | end | |
| 1573 | end | |
| 1574 | end | |
| 1575 | elseif APPLYTOOTHERSINSTEAD == false then | |
| 1576 | if THEMAGNITUDE <= (MAGNITUDE * Player_Size) then | |
| 1577 | if Player.Neutral == false and game.Players:GetPlayerFromCharacter(THEHEAD.Parent) ~= nil then | |
| 1578 | if game.Players:GetPlayerFromCharacter(THEHEAD.Parent).TeamColor == Player.TeamColor then | |
| 1579 | IncreaseOrDecreaseStat(THEHEAD.Parent, STAT, AMOUNT, DURATION, SHOWBUFFORDEBUFF) | |
| 1580 | end | |
| 1581 | end | |
| 1582 | end | |
| 1583 | end | |
| 1584 | end | |
| 1585 | end | |
| 1586 | end | |
| 1587 | end | |
| 1588 | ||
| 1589 | --//=================================\\ | |
| 1590 | --\\=================================// | |
| 1591 | ||
| 1592 | ||
| 1593 | ||
| 1594 | ||
| 1595 | ||
| 1596 | --//=================================\\ | |
| 1597 | --|| WEAPON GUI | |
| 1598 | --\\=================================// | |
| 1599 | ||
| 1600 | local MANABAR = CreateFrame(WEAPONGUI, Mana_Bar_Background_Transparency, 2, UD2(0.23, 0, 0.82, 0), UD2(0.26, 0, 0, 0), C3(Custom_Colors.Custom_Color_8.r, Custom_Colors.Custom_Color_8.g, Custom_Colors.Custom_Color_8.b), C3(0, 0, 0),"Mana Bar") | |
| 1601 | local MANACOVER = CreateFrame(MANABAR, 0, 2, UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), C3(Custom_Colors.Custom_Color_5.r, Custom_Colors.Custom_Color_5.g, Custom_Colors.Custom_Color_5.b), C3(0, 0, 0),"Mana Cover") | |
| 1602 | local MANATEXT = CreateLabel(MANABAR, Mana_Name.." ["..FLOOR(Mana.Value).."]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Mana Text") | |
| 1603 | ||
| 1604 | local HEALTHBAR = CreateFrame(WEAPONGUI, Health_Bar_Background_Transparency, 2, UD2(0.5, 0, 0.82, 0), UD2(0.26, 0, 0, 0), C3(Custom_Colors.Custom_Color_11.r, Custom_Colors.Custom_Color_11.g, Custom_Colors.Custom_Color_11.b), C3(0, 0, 0), "Health Bar") | |
| 1605 | local HEALTHCOVER = CreateFrame(HEALTHBAR, 0, 2,UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), C3(Custom_Colors.Custom_Color_6.r, Custom_Colors.Custom_Color_6.g, Custom_Colors.Custom_Color_6.b), C3(0, 0, 0), "Health Cover") | |
| 1606 | local HEALTHTEXT = CreateLabel(HEALTHBAR, "Health ["..FLOOR(Humanoid.Health).."]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Health Text") | |
| 1607 | ||
| 1608 | local STUNFRAME = CreateFrame(nil, Stun_Bar_Background_Transparency, 2, UD2(0.5, 0, 0.78, 0),UD2(0.26, 0, 0, 0),C3(Custom_Colors.Custom_Color_10.r, Custom_Colors.Custom_Color_10.g, Custom_Colors.Custom_Color_10.b), C3(0, 0, 0), "Stun Frame") | |
| 1609 | local STUNBAR = CreateFrame(STUNFRAME, 0, 2, UD2(0, 0, 0, 0),UD2(0, 0, 1, 0),C3(Custom_Colors.Custom_Color_7.r, Custom_Colors.Custom_Color_7.g, Custom_Colors.Custom_Color_7.b), C3(0, 0, 0), "Stun Bar") | |
| 1610 | local STUNTEXT = CreateLabel(STUNFRAME, "Stun ["..FLOOR(StunValue.Value).."]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Stun Text") | |
| 1611 | ||
| 1612 | local SECONDARYMANABAR = CreateFrame(nil, Secondary_Mana_Bar_Background_Transparency, 2, UD2(0.23, 0, 0.78, 0), UD2(0.26, 0, 0, 0), C3(Custom_Colors.Custom_Color_9.r, Custom_Colors.Custom_Color_9.g, Custom_Colors.Custom_Color_9.b), C3(0, 0, 0),"Secondary Mana Bar") | |
| 1613 | local SECONDARYMANACOVER = CreateFrame(SECONDARYMANABAR, 0, 2, UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), C3(Custom_Colors.Custom_Color_4.r, Custom_Colors.Custom_Color_4.g, Custom_Colors.Custom_Color_4.b), C3(0, 0, 0),"Secondary Mana Cover") | |
| 1614 | local SECONDARYMANATEXT = CreateLabel(SECONDARYMANABAR, Secondary_Mana_Name.." ["..FLOOR(SecondaryMana.Value).."]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Secondary Mana Text") | |
| 1615 | ||
| 1616 | local DEFENSEFRAME = CreateFrame(nil, Stat_Background_Transparency, 2, UD2(0.23, 0, Stat_Offset, 0), UD2(0.075, 0, 0, 0), C3(100 / 255, 100 / 255, 255 / 255), C3(0, 0, 0),"Defense Frame") | |
| 1617 | local DEFENSETEXT = CreateLabel(DEFENSEFRAME, "Defense ["..(Defense.Value * 100).."%]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Defense Text") | |
| 1618 | ||
| 1619 | local DAMAGEFRAME = CreateFrame(nil, Stat_Background_Transparency, 2, UD2(0.456, 0, Stat_Offset, 0), UD2(0.075, 0, 0, 0), C3(255 / 255, 100 / 255, 100 / 255), C3(0, 0, 0),"Damage Frame") | |
| 1620 | local DAMAGETEXT = CreateLabel(DAMAGEFRAME, "Damage ["..(Damage.Value * 100).."%]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Damage Text") | |
| 1621 | ||
| 1622 | local MOVEMENTFRAME = CreateFrame(nil, Stat_Background_Transparency, 2, UD2(0.685, 0, Stat_Offset, 0), UD2(0.075, 0, 0, 0), C3(100 / 255, 255 / 255, 100 / 255), C3(0, 0, 0),"Movement Frame") | |
| 1623 | local MOVEMENTTEXT = CreateLabel(MOVEMENTFRAME, "Movement ["..(Movement.Value * 100).."%]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Movement Text") | |
| 1624 | ||
| 1625 | local SKILL1FRAME = CreateFrame(nil, Ability_Background_Transparency, 2, UD2(0.23, 0, 0.86, 0), UD2(0.26, 0, 0, 0), C3(Custom_Colors.Custom_Color_12.r, Custom_Colors.Custom_Color_12.g, Custom_Colors.Custom_Color_12.b), C3(0, 0, 0), "Skill 1 Frame") | |
| 1626 | local SKILL2FRAME = CreateFrame(nil, Ability_Background_Transparency, 2, UD2(0.50, 0, 0.86, 0), UD2(0.26, 0, 0, 0), C3(Custom_Colors.Custom_Color_12.r, Custom_Colors.Custom_Color_12.g, Custom_Colors.Custom_Color_12.b), C3(0, 0, 0), "Skill 2 Frame") | |
| 1627 | local SKILL3FRAME = CreateFrame(nil, Ability_Background_Transparency, 2, UD2(0.23, 0, 0.93, 0), UD2(0.26, 0, 0, 0), C3(Custom_Colors.Custom_Color_12.r, Custom_Colors.Custom_Color_12.g, Custom_Colors.Custom_Color_12.b), C3(0, 0, 0), "Skill 3 Frame") | |
| 1628 | local SKILL4FRAME = CreateFrame(nil, Ability_Background_Transparency, 2, UD2(0.50, 0, 0.93, 0), UD2(0.26, 0, 0, 0), C3(Custom_Colors.Custom_Color_12.r, Custom_Colors.Custom_Color_12.g, Custom_Colors.Custom_Color_12.b), C3(0, 0, 0), "Skill 4 Frame") | |
| 1629 | ||
| 1630 | local SKILL1BAR = CreateFrame(SKILL1FRAME, 0, 2, UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), C3(Custom_Colors.Custom_Color_3.r, Custom_Colors.Custom_Color_3.g, Custom_Colors.Custom_Color_3.b), C3(0, 0, 0), "Skill 1 Bar") | |
| 1631 | local SKILL2BAR = CreateFrame(SKILL2FRAME, 0, 2, UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), C3(Custom_Colors.Custom_Color_3.r, Custom_Colors.Custom_Color_3.g, Custom_Colors.Custom_Color_3.b), C3(0, 0, 0), "Skill 2 Bar") | |
| 1632 | local SKILL3BAR = CreateFrame(SKILL3FRAME, 0, 2, UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), C3(Custom_Colors.Custom_Color_3.r, Custom_Colors.Custom_Color_3.g, Custom_Colors.Custom_Color_3.b), C3(0, 0, 0), "Skill 3 Bar") | |
| 1633 | local SKILL4BAR = CreateFrame(SKILL4FRAME, 0, 2, UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), C3(Custom_Colors.Custom_Color_3.r, Custom_Colors.Custom_Color_3.g, Custom_Colors.Custom_Color_3.b), C3(0, 0, 0), "Skill 4 Bar") | |
| 1634 | ||
| 1635 | local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] Ability 1", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Text 1") | |
| 1636 | local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[X] Ability 2", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Text 2") | |
| 1637 | local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Ability 3", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Text 3") | |
| 1638 | local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Ability 4", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Text 4") | |
| 1639 | ||
| 1640 | local Gun = CreatePart(3, Weapon, "SmoothPlastic", 0, 0, "Really black", "Handle", VT(0, 0, 0)) | |
| 1641 | local HandleMesh = CreateMesh("SpecialMesh", Gun, "FileMesh", "72012879", "72012859", VT(2,2,2), VT(0,0, 0))
| |
| 1642 | local Weld = CreateWeldOrSnapOrMotor("Weld", Gun, RightArm, Gun, CF(0 * Player_Size, -1.6 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(180), RAD(0), RAD(0)), CF(0, 0, 0))
| |
| 1643 | ||
| 1644 | local GunPoint = CreatePart(3, Weapon, "SmoothPlastic", 0, 1, "Really black", "Handle", VT(0, 0, 0)) | |
| 1645 | local HandleWeld = CreateWeldOrSnapOrMotor("Weld", GunPoint, RightArm, GunPoint, CF(0 * Player_Size, -2.6 * Player_Size, -0.6 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(135)), CF(0, 0, 0))
| |
| 1646 | ||
| 1647 | if Enable_Gui == true then | |
| 1648 | WEAPONGUI.Parent = PlayerGui | |
| 1649 | end | |
| 1650 | ||
| 1651 | if Enable_Stats == true and Show_Stats == true then | |
| 1652 | DEFENSEFRAME.Parent = WEAPONGUI | |
| 1653 | DAMAGEFRAME.Parent = WEAPONGUI | |
| 1654 | MOVEMENTFRAME.Parent = WEAPONGUI | |
| 1655 | end | |
| 1656 | ||
| 1657 | if Enable_Secondary_Bar == true then | |
| 1658 | SECONDARYMANABAR.Parent = WEAPONGUI | |
| 1659 | end | |
| 1660 | ||
| 1661 | if Enable_Abilities == true then | |
| 1662 | SKILL1FRAME.Parent = WEAPONGUI | |
| 1663 | SKILL2FRAME.Parent = WEAPONGUI | |
| 1664 | SKILL3FRAME.Parent = WEAPONGUI | |
| 1665 | SKILL4FRAME.Parent = WEAPONGUI | |
| 1666 | end | |
| 1667 | ||
| 1668 | if Enable_Stun == true then | |
| 1669 | STUNFRAME.Parent = WEAPONGUI | |
| 1670 | end | |
| 1671 | ||
| 1672 | function UpdateGUI() | |
| 1673 | MANABAR:TweenSize(UD2(0.26, 0, 0.03, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
| 1674 | MANACOVER:TweenSize(UD2(1 * (Mana.Value / Max_Mana), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
| 1675 | MANATEXT.Text = Mana_Name.." ["..FLOOR(Mana.Value).."]" | |
| 1676 | HEALTHBAR:TweenSize(UD2(0.26, 0, 0.03, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
| 1677 | HEALTHCOVER:TweenSize(UD2(1 * (Humanoid.Health / Humanoid.MaxHealth), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
| 1678 | HEALTHTEXT.Text = "Health ["..FLOOR(Humanoid.Health).."]" | |
| 1679 | if Enable_Abilities == true then | |
| 1680 | SKILL1FRAME:TweenSize(UD2(0.26, 0, 0.06, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
| 1681 | SKILL2FRAME:TweenSize(UD2(0.26, 0, 0.06, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
| 1682 | SKILL3FRAME:TweenSize(UD2(0.26, 0, 0.06, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
| 1683 | SKILL4FRAME:TweenSize(UD2(0.26, 0, 0.06, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
| 1684 | SKILL1BAR:TweenSize(UD2(1 * (CO1 / Cooldown_1), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
| 1685 | SKILL2BAR:TweenSize(UD2(1 * (CO2 / Cooldown_2), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
| 1686 | SKILL3BAR:TweenSize(UD2(1 * (CO3 / Cooldown_3), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
| 1687 | SKILL4BAR:TweenSize(UD2(1 * (CO4 / Cooldown_4), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
| 1688 | end | |
| 1689 | if Enable_Stats == true and Show_Stats == true then | |
| 1690 | DEFENSEFRAME:TweenSize(UD2(0.075, 0, 0.03), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
| 1691 | DEFENSETEXT.Text = "Defense ["..(Defense.Value * 100).."%]" | |
| 1692 | DAMAGEFRAME:TweenSize(UD2(0.075, 0, 0.03), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
| 1693 | DAMAGETEXT.Text = "Damage ["..(Damage.Value * 100).."%]" | |
| 1694 | MOVEMENTFRAME:TweenSize(UD2(0.075, 0, 0.03), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
| 1695 | MOVEMENTTEXT.Text = "Movement ["..(Movement.Value * 100).."%]" | |
| 1696 | end | |
| 1697 | if Enable_Stun == true then | |
| 1698 | STUNFRAME:TweenSize(UD2(0.26, 0, 0.03, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
| 1699 | STUNBAR:TweenSize(UD2(1 * (StunValue.Value / Max_Stun), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
| 1700 | STUNTEXT.Text = "Stun ["..FLOOR(StunValue.Value).."]" | |
| 1701 | end | |
| 1702 | if Enable_Secondary_Bar == true then | |
| 1703 | SECONDARYMANABAR:TweenSize(UD2(0.26, 0, 0.03, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
| 1704 | SECONDARYMANACOVER:TweenSize(UD2(1 * (SecondaryMana.Value / Max_Secondary_Mana), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
| 1705 | SECONDARYMANATEXT.Text = Secondary_Mana_Name.." ["..FLOOR(SecondaryMana.Value).."]" | |
| 1706 | end | |
| 1707 | end | |
| 1708 | ||
| 1709 | if Enable_Gui == true then | |
| 1710 | UpdateGUI() | |
| 1711 | for _, v in pairs (WEAPONGUI:GetChildren()) do | |
| 1712 | if v.ClassName == "Frame" then | |
| 1713 | for _, b in pairs (v:GetChildren()) do | |
| 1714 | if b.ClassName == "TextLabel" then | |
| 1715 | coroutine.resume(coroutine.create(function(THETEXTLABEL) | |
| 1716 | wait(Menu_Update_Speed) | |
| 1717 | for i = 1, 0, -0.1 do | |
| 1718 | Swait() | |
| 1719 | THETEXTLABEL.TextTransparency = i | |
| 1720 | THETEXTLABEL.TextStrokeTransparency = i | |
| 1721 | end | |
| 1722 | THETEXTLABEL.TextTransparency = 0 | |
| 1723 | THETEXTLABEL.TextStrokeTransparency = 0 | |
| 1724 | end), b) | |
| 1725 | end | |
| 1726 | end | |
| 1727 | end | |
| 1728 | end | |
| 1729 | end | |
| 1730 | ||
| 1731 | --//=================================\\ | |
| 1732 | --\\=================================// | |
| 1733 | ||
| 1734 | ||
| 1735 | ||
| 1736 | ||
| 1737 | ||
| 1738 | --//=================================\\ | |
| 1739 | --|| SKILL FUNCTIONS | |
| 1740 | --\\=================================// | |
| 1741 | ||
| 1742 | function UpdateSkillsAndStuff() | |
| 1743 | if Mana_Regen_Mode == "1" then | |
| 1744 | if Mana.Value >= Max_Mana then | |
| 1745 | Mana.Value = Max_Mana | |
| 1746 | elseif Mana.Value < 0 then | |
| 1747 | Mana.Value = 0 | |
| 1748 | else | |
| 1749 | if MANADELAYNUMBER <= Mana_Wait then | |
| 1750 | MANADELAYNUMBER = MANADELAYNUMBER + 1 | |
| 1751 | else | |
| 1752 | MANADELAYNUMBER = 0 | |
| 1753 | Mana.Value = Mana.Value + Recover_Mana | |
| 1754 | end | |
| 1755 | end | |
| 1756 | elseif Mana_Regen_Mode == "2" then | |
| 1757 | if Mana.Value <= Max_Mana then | |
| 1758 | Mana.Value = Mana.Value + (Recover_Mana / 30) / Animation_Speed | |
| 1759 | elseif Mana.Value >= Max_Mana then | |
| 1760 | Mana.Value = Max_Mana | |
| 1761 | elseif Mana.Value < 0 then | |
| 1762 | Mana.Value = 0 | |
| 1763 | end | |
| 1764 | end | |
| 1765 | if Enable_Secondary_Bar == true then | |
| 1766 | if Secondary_Mana_Regen_Mode == "1" then | |
| 1767 | if SecondaryMana.Value >= Max_Secondary_Mana then | |
| 1768 | SecondaryMana.Value = Max_Secondary_Mana | |
| 1769 | elseif SecondaryMana.Value < 0 then | |
| 1770 | SecondaryMana.Value = 0 | |
| 1771 | else | |
| 1772 | if SECONDARYMANADELAYNUMBER <= Secondary_Mana_Wait then | |
| 1773 | SECONDARYMANADELAYNUMBER = SECONDARYMANADELAYNUMBER + 1 | |
| 1774 | else | |
| 1775 | SECONDARYMANADELAYNUMBER = 0 | |
| 1776 | SecondaryMana.Value = SecondaryMana.Value + Recover_Secondary_Mana | |
| 1777 | end | |
| 1778 | end | |
| 1779 | elseif Secondary_Mana_Regen_Mode == "2" then | |
| 1780 | if SecondaryMana.Value <= Max_Secondary_Mana then | |
| 1781 | SecondaryMana.Value = SecondaryMana.Value + (Recover_Secondary_Mana / 30) / Animation_Speed | |
| 1782 | elseif SecondaryMana.Value >= Max_Secondary_Mana then | |
| 1783 | SecondaryMana.Value = Max_Secondary_Mana | |
| 1784 | elseif SecondaryMana.Value < 0 then | |
| 1785 | SecondaryMana.Value = 0 | |
| 1786 | end | |
| 1787 | end | |
| 1788 | else | |
| 1789 | SecondaryMana.Value = 0 | |
| 1790 | end | |
| 1791 | if Enable_Stun == true then | |
| 1792 | if Stun_Lose_Mode == "1" then | |
| 1793 | if StunValue.Value > Max_Stun then | |
| 1794 | StunValue.Value = Max_Stun | |
| 1795 | elseif StunValue.Value <= 0 then | |
| 1796 | StunValue.Value = 0 | |
| 1797 | else | |
| 1798 | if STUNDELAYNUMBER <= Stun_Wait then | |
| 1799 | STUNDELAYNUMBER = STUNDELAYNUMBER + 1 | |
| 1800 | else | |
| 1801 | STUNDELAYNUMBER = 0 | |
| 1802 | StunValue.Value = StunValue.Value - Lose_Stun | |
| 1803 | end | |
| 1804 | end | |
| 1805 | elseif Stun_Lose_Mode == "2" then | |
| 1806 | if StunValue.Value <= Max_Stun and StunValue.Value > 0 then | |
| 1807 | StunValue.Value = StunValue.Value - (Lose_Stun / 30) / Animation_Speed | |
| 1808 | elseif StunValue.Value > Max_Stun then | |
| 1809 | StunValue.Value = Max_Stun | |
| 1810 | elseif StunValue.Value <= 0 then | |
| 1811 | StunValue.Value = 0 | |
| 1812 | end | |
| 1813 | end | |
| 1814 | else | |
| 1815 | StunValue.Value = 0 | |
| 1816 | end | |
| 1817 | if Enable_Abilities == true then | |
| 1818 | if CO1 <= Cooldown_1 then | |
| 1819 | CO1 = CO1 + (1 / 30) / Animation_Speed | |
| 1820 | elseif CO1 >= Cooldown_1 then | |
| 1821 | CO1 = Cooldown_1 | |
| 1822 | end | |
| 1823 | if CO2 <= Cooldown_2 then | |
| 1824 | CO2 = CO2 + (1 / 30) / Animation_Speed | |
| 1825 | elseif CO2 >= Cooldown_2 then | |
| 1826 | CO2 = Cooldown_2 | |
| 1827 | end | |
| 1828 | if CO3 <= Cooldown_3 then | |
| 1829 | CO3 = CO3 + (1 / 30) / Animation_Speed | |
| 1830 | elseif CO3 >= Cooldown_3 then | |
| 1831 | CO3 = Cooldown_3 | |
| 1832 | end | |
| 1833 | if CO4 <= Cooldown_4 then | |
| 1834 | CO4 = CO4 + (1 / 30) / Animation_Speed | |
| 1835 | elseif CO4 >= Cooldown_4 then | |
| 1836 | CO4 = Cooldown_4 | |
| 1837 | end | |
| 1838 | end | |
| 1839 | end | |
| 1840 | ||
| 1841 | --//=================================\\ | |
| 1842 | --\\=================================// | |
| 1843 | ||
| 1844 | ||
| 1845 | ||
| 1846 | ||
| 1847 | ||
| 1848 | --//=================================\\ | |
| 1849 | --|| ATTACK FUNCTIONS AND STUFF | |
| 1850 | --\\=================================// | |
| 1851 | ||
| 1852 | function StaggerHitAnimation() | |
| 1853 | ATTACK = true | |
| 1854 | if Weapon:FindFirstChild("Hitbox") ~= nil then
| |
| 1855 | for i = 1, MRANDOM(2, 4) do | |
| 1856 | ClangEffect("Bright yellow", "Neon", CF(Weapon:FindFirstChild("Hitbox").Position) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), 20, 5, 0.2, MRANDOM(5, 15) / 10, 0, -0.02, 0, -0.02, 0.1)
| |
| 1857 | end | |
| 1858 | end | |
| 1859 | for i = 0, 1, 0.1 / Animation_Speed do | |
| 1860 | Swait() | |
| 1861 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-10), RAD(0), RAD(-30)), 0.3 / Animation_Speed) | |
| 1862 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(30)) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.3 / Animation_Speed) | |
| 1863 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-30), RAD(0), RAD(60)) * ANGLES(RAD(0), RAD(-30), RAD(0)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed) | |
| 1864 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-20), RAD(0), RAD(-20)) * ANGLES(RAD(0), RAD(20), RAD(0)) * LEFTSHOULDERC0, 0.3 / Animation_Speed) | |
| 1865 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.9 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(-20)), 0.3 / Animation_Speed) | |
| 1866 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1.1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(10)), 0.3 / Animation_Speed) | |
| 1867 | if Stagger.Value == true or Stun.Value == true then | |
| 1868 | break | |
| 1869 | end | |
| 1870 | end | |
| 1871 | ATTACK = false | |
| 1872 | end | |
| 1873 | ||
| 1874 | function StaggerAnimation() | |
| 1875 | ATTACK = true | |
| 1876 | if Weapon:FindFirstChild("Hitbox") ~= nil then
| |
| 1877 | for i = 1, MRANDOM(2, 4) do | |
| 1878 | ClangEffect("Bright yellow", "Neon", CF(Weapon:FindFirstChild("Hitbox").Position) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), 20, 5, 0.2, MRANDOM(5, 15) / 10, 0, -0.02, 0, -0.02, 0.1)
| |
| 1879 | end | |
| 1880 | end | |
| 1881 | DISABLEJUMPING = true | |
| 1882 | COMBO = 1 | |
| 1883 | StatLabel("Interruption", Head.CFrame * CF(0, 0 + (Head.Size.z - 1), 0), "Staggered!", C3(255 / 255, 255 / 255, 0))
| |
| 1884 | local STAGGERVELOCITY = Instance.new("BodyVelocity",Torso)
| |
| 1885 | STAGGERVELOCITY.P = 500 | |
| 1886 | STAGGERVELOCITY.maxForce = VT(math.huge, 0, math.huge) | |
| 1887 | if Rooted.Value == false then | |
| 1888 | STAGGERVELOCITY.Velocity = RootPart.CFrame.lookVector * -40 | |
| 1889 | end | |
| 1890 | for i = 0, 1, 0.35 / Animation_Speed do | |
| 1891 | Swait() | |
| 1892 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.3 / Animation_Speed) | |
| 1893 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(2.5), RAD(0), RAD(20)), 0.3 / Animation_Speed) | |
| 1894 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size,0 * Player_Size) * ANGLES(RAD(-15), RAD(0), RAD(30)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed) | |
| 1895 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size,0 * Player_Size) * ANGLES(RAD(-7.5), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.3 / Animation_Speed) | |
| 1896 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size,0 * Player_Size) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(30)), 0.3 / Animation_Speed) | |
| 1897 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size,0 * Player_Size) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(5)), 0.3 / Animation_Speed) | |
| 1898 | end | |
| 1899 | for i = 0, 1, 0.2 / Animation_Speed do | |
| 1900 | Swait() | |
| 1901 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.25 * Player_Size) * ANGLES(RAD(-25), RAD(0), RAD(-20)), 0.4 / Animation_Speed) | |
| 1902 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.4 / Animation_Speed) | |
| 1903 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-15), RAD(0), RAD(30)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
| 1904 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-7.5), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
| 1905 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(50)), 0.4 / Animation_Speed) | |
| 1906 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(25)), 0.4 / Animation_Speed) | |
| 1907 | end | |
| 1908 | STAGGERVELOCITY.Parent = nil | |
| 1909 | for i = 1, 50 * Animation_Speed do | |
| 1910 | Swait() | |
| 1911 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -1.8 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-20)) * ANGLES(RAD(-5), RAD(-5), RAD(0)), 0.3 / Animation_Speed) | |
| 1912 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(20), RAD(0), RAD(20)) * ANGLES(RAD(0), RAD(5), RAD(0)), 0.3 / Animation_Speed) | |
| 1913 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(20)) * ANGLES(RAD(0), RAD(-20), RAD(0)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed) | |
| 1914 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-15), RAD(0), RAD(-10)) * ANGLES(RAD(0), RAD(15), RAD(0)) * LEFTSHOULDERC0, 0.3 / Animation_Speed) | |
| 1915 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.4 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(70)) * ANGLES(RAD(0), RAD(30), RAD(0)), 0.3 / Animation_Speed) | |
| 1916 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, 0.5 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-2.5), RAD(0), RAD(-10)), 0.3 / Animation_Speed) | |
| 1917 | end | |
| 1918 | DISABLEJUMPING = false | |
| 1919 | ATTACK = false | |
| 1920 | end | |
| 1921 | ||
| 1922 | function StunAnimation() | |
| 1923 | ATTACK = true | |
| 1924 | DISABLEJUMPING = true | |
| 1925 | COMBO = 1 | |
| 1926 | StatLabel("Interruption", Head.CFrame * CF(0, 0 + (Head.Size.z - 1), 0), "Stunned!", C3(255 / 255, 255 / 255, 0))
| |
| 1927 | for i = 0, 1, 0.3 / Animation_Speed do | |
| 1928 | Swait() | |
| 1929 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.05 * Player_Size) * ANGLES(RAD(15), RAD(0), RAD(-150)), 0.3 / Animation_Speed) | |
| 1930 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-10), RAD(0), RAD(-20)), 0.3 / Animation_Speed) | |
| 1931 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(30), RAD(0), RAD(40)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed) | |
| 1932 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-20), RAD(0), RAD(-50)) * LEFTSHOULDERC0, 0.3 / Animation_Speed) | |
| 1933 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(30)), 0.3 / Animation_Speed) | |
| 1934 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(20)), 0.3 / Animation_Speed) | |
| 1935 | end | |
| 1936 | for i = 0, 1, 0.3 / Animation_Speed do | |
| 1937 | Swait() | |
| 1938 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.05 * Player_Size) * ANGLES(RAD(45), RAD(0), RAD(-180)), 0.4 / Animation_Speed) | |
| 1939 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-15), RAD(0), RAD(-30)), 0.4 / Animation_Speed) | |
| 1940 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(30), RAD(0), RAD(40)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
| 1941 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-20), RAD(0), RAD(-50)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
| 1942 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(15)), 0.4 / Animation_Speed) | |
| 1943 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(50)), 0.4 / Animation_Speed) | |
| 1944 | end | |
| 1945 | for i = 0, 1, 0.3 / Animation_Speed do | |
| 1946 | Swait() | |
| 1947 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(75), RAD(0), RAD(-180)), 0.4 / Animation_Speed) | |
| 1948 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-15), RAD(0), RAD(-60)), 0.4 / Animation_Speed) | |
| 1949 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(20), RAD(0), RAD(70)) * ANGLES(RAD(0), RAD(30), RAD(0)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
| 1950 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-10), RAD(0), RAD(-80)) * ANGLES(RAD(0), RAD(-40), RAD(0)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
| 1951 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(10)), 0.4 / Animation_Speed) | |
| 1952 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(80)), 0.4 / Animation_Speed) | |
| 1953 | end | |
| 1954 | for i = 1, 70 * Animation_Speed do | |
| 1955 | Swait() | |
| 1956 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -2.5 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(-180)), 0.3 / Animation_Speed) | |
| 1957 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.3 / Animation_Speed) | |
| 1958 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(-10), RAD(90)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed) | |
| 1959 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(-90)) * LEFTSHOULDERC0, 0.3 / Animation_Speed) | |
| 1960 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0.2 * Player_Size) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(0)), 0.3 / Animation_Speed) | |
| 1961 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(0)), 0.3 / Animation_Speed) | |
| 1962 | end | |
| 1963 | for i = 0, 1, 0.2 / Animation_Speed do | |
| 1964 | Swait() | |
| 1965 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -1.5 * Player_Size) * ANGLES(RAD(20), RAD(0), RAD(100)), 0.4 / Animation_Speed) | |
| 1966 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-30)), 0.4 / Animation_Speed) | |
| 1967 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-20), RAD(-10), RAD(30)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
| 1968 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(80), RAD(0), RAD(20)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
| 1969 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(60), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(70)), 0.4 / Animation_Speed) | |
| 1970 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.25 * Player_Size, -1 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(20)), 0.4 / Animation_Speed) | |
| 1971 | end | |
| 1972 | DISABLEJUMPING = false | |
| 1973 | ATTACK = false | |
| 1974 | end | |
| 1975 | ||
| 1976 | function EAbility() | |
| 1977 | ATTACK = true | |
| 1978 | ATTACK = false | |
| 1979 | end | |
| 1980 | ||
| 1981 | function Attack1() | |
| 1982 | ATTACK = true | |
| 1983 | for i=0, 1, 0.1 / Animation_Speed do | |
| 1984 | Swait() | |
| 1985 | RootPart.CFrame=CFrame.new(RootPart.CFrame.p,Vector3.new(Mouse.Hit.p.X,RootPart.Position.Y,Mouse.Hit.p.Z)) * CFrame.new(0, 0, 0) | |
| 1986 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(35)), 0.2 / Animation_Speed) | |
| 1987 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(10), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 1988 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(150), RAD(0), RAD(-20)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
| 1989 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.2 * Player_Size, 0.4 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
| 1990 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 1991 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 1992 | if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then | |
| 1993 | break | |
| 1994 | end | |
| 1995 | end | |
| 1996 | while true do | |
| 1997 | wait(0.01) | |
| 1998 | if HOLD == true then | |
| 1999 | shoot() | |
| 2000 | elseif HOLD == false then | |
| 2001 | break | |
| 2002 | end | |
| 2003 | end | |
| 2004 | ATTACK = false | |
| 2005 | end | |
| 2006 | ||
| 2007 | function shoot() | |
| 2008 | ATTACK = true | |
| 2009 | for i=0, 1, 0.1 / Animation_Speed do | |
| 2010 | Swait() | |
| 2011 | RootPart.CFrame=CFrame.new(RootPart.CFrame.p,Vector3.new(Mouse.Hit.p.X,RootPart.Position.Y,Mouse.Hit.p.Z)) * CFrame.new(0, 0, 0) | |
| 2012 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(35)), 0.2 / Animation_Speed) | |
| 2013 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(10), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2014 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(30)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
| 2015 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.2 * Player_Size, 0.4 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
| 2016 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2017 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2018 | if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then | |
| 2019 | break | |
| 2020 | end | |
| 2021 | end | |
| 2022 | CreateSound("930650202", GunPoint, 1.2, MRANDOM(8, 9) / 10)
| |
| 2023 | ShootFireball(GunPoint.CFrame.p, Mouse.hit.p, 15, 5, 100, 25, 45) | |
| 2024 | Disable_Jump = true | |
| 2025 | Humanoid.WalkSpeed = 0 | |
| 2026 | for i = 1, 3 do | |
| 2027 | MagicBlock("White", "Neon", GunPoint.CFrame * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(0, 0, 0), VT(0, 0, 0), 3, 3, 3, 1, 1, 1, 0.1)
| |
| 2028 | end | |
| 2029 | for i=0, 1, 0.1 / Animation_Speed do | |
| 2030 | Swait() | |
| 2031 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(35)), 0.2 / Animation_Speed) | |
| 2032 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(10), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2033 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(25), RAD(30)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
| 2034 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.2 * Player_Size, 0.4 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(15), RAD(-25)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
| 2035 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2036 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2037 | if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then | |
| 2038 | break | |
| 2039 | end | |
| 2040 | end | |
| 2041 | Disable_Jump = false | |
| 2042 | Humanoid.WalkSpeed = 16 | |
| 2043 | ATTACK = false | |
| 2044 | end | |
| 2045 | ||
| 2046 | function PointBlank() | |
| 2047 | ATTACK = true | |
| 2048 | for i=0, 1, 0.1 / Animation_Speed do | |
| 2049 | Swait() | |
| 2050 | RootPart.CFrame=CFrame.new(RootPart.CFrame.p,Vector3.new(Mouse.Hit.p.X,RootPart.Position.Y,Mouse.Hit.p.Z)) * CFrame.new(0, 0, 0) | |
| 2051 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(35)), 0.2 / Animation_Speed) | |
| 2052 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(10), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2053 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(150), RAD(0), RAD(-20)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
| 2054 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.2 * Player_Size, 0.4 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
| 2055 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2056 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2057 | if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then | |
| 2058 | break | |
| 2059 | end | |
| 2060 | end | |
| 2061 | for i=0, 1, 0.1 / Animation_Speed/2 do | |
| 2062 | Swait() | |
| 2063 | RootPart.CFrame=CFrame.new(RootPart.CFrame.p,Vector3.new(Mouse.Hit.p.X,RootPart.Position.Y,Mouse.Hit.p.Z)) * CFrame.new(0, 0, 0) | |
| 2064 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(35)), 0.2 / Animation_Speed) | |
| 2065 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(10), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2066 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(30)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
| 2067 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.2 * Player_Size, 0.4 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
| 2068 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2069 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2070 | if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then | |
| 2071 | break | |
| 2072 | end | |
| 2073 | end | |
| 2074 | MagnitudeDamage(HITWEAPONSOUNDS[MRANDOM(1, #HITWEAPONSOUNDS)], HITARMORSOUNDS[MRANDOM(1, #HITARMORSOUNDS)], HITBLOCKSOUNDS[MRANDOM(1, #HITBLOCKSOUNDS)], HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], 1, 1, 1, 1, GunPoint, 12, false, 85, 135, MRANDOM(5, 10), "Normal", RootPart, 0.5, 1, MRANDOM(5, 10), nil, true, false, nil, 0, 0, false) | |
| 2075 | CreateSound("213603013", GunPoint, 5, MRANDOM(8, 9) / 10)
| |
| 2076 | Disable_Jump = true | |
| 2077 | Humanoid.WalkSpeed = 0 | |
| 2078 | for i = 1, 15 do | |
| 2079 | SIZE = MRANDOM(70,200) | |
| 2080 | MagicBlock("White", "Neon", GunPoint.CFrame * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(0, 0, 0), VT(0, 0, 0), SIZE, SIZE, SIZE, 1, 1, 1, 0.1)
| |
| 2081 | end | |
| 2082 | for i=0, 1, 0.1 / Animation_Speed do | |
| 2083 | Swait() | |
| 2084 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(35)), 0.2 / Animation_Speed) | |
| 2085 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(10), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2086 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(25), RAD(30)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
| 2087 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.2 * Player_Size, 0.4 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(15), RAD(-25)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
| 2088 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2089 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2090 | if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then | |
| 2091 | break | |
| 2092 | end | |
| 2093 | end | |
| 2094 | Disable_Jump = false | |
| 2095 | Humanoid.WalkSpeed = 16 | |
| 2096 | ATTACK = false | |
| 2097 | end | |
| 2098 | ||
| 2099 | function ShootFireball(POSITION1, POSITION2, SPEED, SIZE, DURATION, LOWDAMAGE, HIGHDAMAGE) | |
| 2100 | local POS1 = POSITION1 | |
| 2101 | local POS2 = POSITION2 | |
| 2102 | local MOUSELOOK = CF((POS1 + POS2) / 2, POS2) | |
| 2103 | local FIREBALLSPEED = SPEED * Player_Size | |
| 2104 | local FIREBALLDURATION = DURATION | |
| 2105 | local FIREBALLCOLORS = {"White", "Pearl", "Magenta"}
| |
| 2106 | local FIREBALLHITSOUNDS = {"522282998", "527535379", "304448425"}
| |
| 2107 | coroutine.resume(coroutine.create(function() | |
| 2108 | repeat | |
| 2109 | Swait() | |
| 2110 | local FIREBALLHIT, FIREBALLPOS = Raycast(POS1, MOUSELOOK.lookVector, FIREBALLSPEED, Character) | |
| 2111 | POS1 = POS1 + (MOUSELOOK.lookVector * FIREBALLSPEED) | |
| 2112 | MagicBlock(FIREBALLCOLORS[MRANDOM(1, #FIREBALLCOLORS)], "Neon", CF(POS1) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(0, 0, 0), VT(0, 0, 0), SIZE, SIZE, SIZE, SIZE / -10, SIZE / -10, SIZE / -10, 0.1) | |
| 2113 | if FIREBALLHIT ~= nil or FIREBALLDURATION <= 0.1 then | |
| 2114 | FIREBALLDURATION = 0 | |
| 2115 | local FireballHitRefpart = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT()) | |
| 2116 | FireballHitRefpart.Anchored = true | |
| 2117 | FireballHitRefpart.CFrame = CF(FIREBALLPOS) | |
| 2118 | game:GetService("Debris"):AddItem(FireballHitRefpart, 5)
| |
| 2119 | CreateSound(FIREBALLHITSOUNDS[MRANDOM(1, #FIREBALLHITSOUNDS)], FireballHitRefpart, 1.4, MRANDOM(14, 16) / 10) | |
| 2120 | for i = 1, MRANDOM(4, 8) do | |
| 2121 | MagicBlock(FIREBALLCOLORS[MRANDOM(1, #FIREBALLCOLORS)], "Neon", FireballHitRefpart.CFrame * ANGLES(RAD(MRANDOM(-360, 360)), RAD(MRANDOM(-360, 360)), RAD(MRANDOM(-360, 360))), CF(0, MRANDOM(5, 7) / 10 * Player_Size, 0), VT(0, 0, 0), 5, 5, 5, 0, 0, 0, MRANDOM(3, 5) / 100) | |
| 2122 | end | |
| 2123 | MagicBlock("White", "Neon", FireballHitRefpart.CFrame * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5))), VT(0, 0, 0), SIZE, SIZE, SIZE, SIZE / 3, SIZE / 3, SIZE / 3, 0.05)
| |
| 2124 | MagicSphere("Magenta", "Neon", FireballHitRefpart.CFrame * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5))), VT(0, 0, 0), SIZE * 0.5, SIZE * 0.5, SIZE * 0.5, SIZE / 4, SIZE / 4, SIZE / 4, 0.05)
| |
| 2125 | MagicBlock("White", "Neon", FireballHitRefpart.CFrame * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5))), VT(0, 0, 0), SIZE * 0.25, SIZE * 0.25, SIZE * 0.25, SIZE / 5, SIZE / 5, SIZE / 5, 0.05)
| |
| 2126 | MagnitudeDamage("", "", "", "", 1, 1, 1, 1, FireballHitRefpart, SIZE / 2, false, LOWDAMAGE, HIGHDAMAGE, 0, "Normal", RootPart, 0, 1, MRANDOM(10, 15), nil, false, true, nil, 0, 0, false)
| |
| 2127 | else | |
| 2128 | FIREBALLDURATION = FIREBALLDURATION - (1 / 30) / Animation_Speed | |
| 2129 | end | |
| 2130 | until FIREBALLHIT ~= nil or FIREBALLDURATION <= 0 | |
| 2131 | end)) | |
| 2132 | end | |
| 2133 | ||
| 2134 | ||
| 2135 | --//=================================\\ | |
| 2136 | --\\=================================// | |
| 2137 | ||
| 2138 | ||
| 2139 | ||
| 2140 | ||
| 2141 | ||
| 2142 | --//=================================\\ | |
| 2143 | --|| SET THINGS UP | |
| 2144 | --\\=================================// | |
| 2145 | ||
| 2146 | if Start_Equipped == true then | |
| 2147 | ATTACK = true | |
| 2148 | EQUIPPED = true | |
| 2149 | if Disable_Animate == true then | |
| 2150 | ANIMATE.Parent = nil | |
| 2151 | local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION) | |
| 2152 | IDLEANIMATION:Play() | |
| 2153 | end | |
| 2154 | if Disable_Animator == true then | |
| 2155 | ANIMATOR.Parent = nil | |
| 2156 | end | |
| 2157 | if Disable_Moving_Arms == true then | |
| 2158 | RSH = Torso["Right Shoulder"] | |
| 2159 | LSH = Torso["Left Shoulder"] | |
| 2160 | RSH.Parent = nil | |
| 2161 | LSH.Parent = nil | |
| 2162 | if Use_Motors_Instead_Of_Welds == true then | |
| 2163 | RightShoulder = IT("Motor")
| |
| 2164 | LeftShoulder = IT("Motor")
| |
| 2165 | else | |
| 2166 | RightShoulder = IT("Weld")
| |
| 2167 | LeftShoulder = IT("Weld")
| |
| 2168 | end | |
| 2169 | RightShoulder.Name = "Right Shoulder" | |
| 2170 | RightShoulder.Part0 = Torso | |
| 2171 | RightShoulder.C0 = CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) | |
| 2172 | RightShoulder.C1 = CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) | |
| 2173 | RightShoulder.Part1 = Character["Right Arm"] | |
| 2174 | RightShoulder.Parent = Torso | |
| 2175 | LeftShoulder.Name = "Left Shoulder" | |
| 2176 | LeftShoulder.Part0 = Torso | |
| 2177 | LeftShoulder.C0=CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) | |
| 2178 | LeftShoulder.C1=CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) | |
| 2179 | LeftShoulder.Part1 = Character["Left Arm"] | |
| 2180 | LeftShoulder.Parent = Torso | |
| 2181 | RIGHTSHOULDERC0 = CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
| 2182 | LEFTSHOULDERC0 = CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
| 2183 | end | |
| 2184 | if Start_Equipped_With_Equipped_Animation == true then | |
| 2185 | Swait() | |
| 2186 | end | |
| 2187 | ATTACK = false | |
| 2188 | end | |
| 2189 | ||
| 2190 | --//=================================\\ | |
| 2191 | --\\=================================// | |
| 2192 | ||
| 2193 | ||
| 2194 | ||
| 2195 | ||
| 2196 | ||
| 2197 | --//=================================\\ | |
| 2198 | --|| ASSIGN THINGS TO KEYS | |
| 2199 | --\\=================================// | |
| 2200 | ||
| 2201 | Humanoid.Changed:connect(function(Jump) | |
| 2202 | if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then | |
| 2203 | Humanoid.Jump = false | |
| 2204 | end | |
| 2205 | end) | |
| 2206 | ||
| 2207 | function MouseDown(Mouse) | |
| 2208 | if ATTACK == true or EQUIPPED == false then | |
| 2209 | return | |
| 2210 | end | |
| 2211 | HOLD = true | |
| 2212 | Attack1() | |
| 2213 | coroutine.resume(coroutine.create(function() | |
| 2214 | for i=1, 50 do | |
| 2215 | if ATTACK == false then | |
| 2216 | Swait() | |
| 2217 | end | |
| 2218 | end | |
| 2219 | if ATTACK == false then | |
| 2220 | COMBO = 1 | |
| 2221 | end | |
| 2222 | end)) | |
| 2223 | end | |
| 2224 | ||
| 2225 | function MouseUp(Mouse) | |
| 2226 | HOLD = false | |
| 2227 | end | |
| 2228 | ||
| 2229 | function KeyDown(Key) | |
| 2230 | if Key == "f" and Can_Equip_Or_Unequip == true and ATTACK == false then | |
| 2231 | ATTACK = true | |
| 2232 | COMBO = 1 | |
| 2233 | if EQUIPPED == false then | |
| 2234 | EQUIPPED = true | |
| 2235 | if Disable_Animate == true then | |
| 2236 | ANIMATE.Parent = nil | |
| 2237 | local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION) | |
| 2238 | IDLEANIMATION:Play() | |
| 2239 | end | |
| 2240 | if Disable_Animator == true then | |
| 2241 | ANIMATOR.Parent = nil | |
| 2242 | end | |
| 2243 | if Disable_Moving_Arms == true then | |
| 2244 | RSH = Torso["Right Shoulder"] | |
| 2245 | LSH = Torso["Left Shoulder"] | |
| 2246 | RSH.Parent = nil | |
| 2247 | LSH.Parent = nil | |
| 2248 | if Use_Motors_Instead_Of_Welds == true then | |
| 2249 | RightShoulder = IT("Motor")
| |
| 2250 | LeftShoulder = IT("Motor")
| |
| 2251 | else | |
| 2252 | RightShoulder = IT("Weld")
| |
| 2253 | LeftShoulder = IT("Weld")
| |
| 2254 | end | |
| 2255 | RightShoulder.Name = "Right Shoulder" | |
| 2256 | RightShoulder.Part0 = Torso | |
| 2257 | RightShoulder.C0 = CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) | |
| 2258 | RightShoulder.C1 = CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) | |
| 2259 | RightShoulder.Part1 = Character["Right Arm"] | |
| 2260 | RightShoulder.Parent = Torso | |
| 2261 | LeftShoulder.Name = "Left Shoulder" | |
| 2262 | LeftShoulder.Part0 = Torso | |
| 2263 | LeftShoulder.C0=CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) | |
| 2264 | LeftShoulder.C1=CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) | |
| 2265 | LeftShoulder.Part1 = Character["Left Arm"] | |
| 2266 | LeftShoulder.Parent = Torso | |
| 2267 | RIGHTSHOULDERC0 = CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
| 2268 | LEFTSHOULDERC0 = CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
| 2269 | end | |
| 2270 | Swait() | |
| 2271 | elseif EQUIPPED == true then | |
| 2272 | end | |
| 2273 | ATTACK = false | |
| 2274 | end | |
| 2275 | if Key == "e" and EQUIPPED == true and ATTACK == false then | |
| 2276 | PointBlank() | |
| 2277 | end | |
| 2278 | end | |
| 2279 | ||
| 2280 | function KeyUp(Key) | |
| 2281 | end | |
| 2282 | ||
| 2283 | if Use_HopperBin == false then | |
| 2284 | ||
| 2285 | Mouse.Button1Down:connect(function(NEWKEY) | |
| 2286 | MouseDown(NEWKEY) | |
| 2287 | end) | |
| 2288 | Mouse.Button1Up:connect(function(NEWKEY) | |
| 2289 | MouseUp(NEWKEY) | |
| 2290 | end) | |
| 2291 | Mouse.KeyDown:connect(function(NEWKEY) | |
| 2292 | KeyDown(NEWKEY) | |
| 2293 | end) | |
| 2294 | Mouse.KeyUp:connect(function(NEWKEY) | |
| 2295 | KeyUp(NEWKEY) | |
| 2296 | end) | |
| 2297 | ||
| 2298 | elseif Use_HopperBin == true then | |
| 2299 | WEAPONTOOL.Parent = Backpack | |
| 2300 | script.Parent = WEAPONTOOL | |
| 2301 | function SelectTool(Mouse) | |
| 2302 | Mouse.Button1Down:connect(function() | |
| 2303 | MouseDown(Mouse) | |
| 2304 | end) | |
| 2305 | Mouse.Button1Up:connect(function() | |
| 2306 | MouseUp(Mouse) | |
| 2307 | end) | |
| 2308 | Mouse.KeyDown:connect(KeyDown) | |
| 2309 | Mouse.KeyUp:connect(KeyUp) | |
| 2310 | end | |
| 2311 | function DeselectTool(Mouse) | |
| 2312 | end | |
| 2313 | WEAPONTOOL.Selected:connect(SelectTool) | |
| 2314 | WEAPONTOOL.Deselected:connect(DeselectTool) | |
| 2315 | end | |
| 2316 | ||
| 2317 | --//=================================\\ | |
| 2318 | --\\=================================// | |
| 2319 | ||
| 2320 | ||
| 2321 | ||
| 2322 | ||
| 2323 | ||
| 2324 | --//=================================\\ | |
| 2325 | --|| WRAP THE WHOLE SCRIPT UP | |
| 2326 | --\\=================================// | |
| 2327 | ||
| 2328 | while true do | |
| 2329 | Swait() | |
| 2330 | if Enable_Gui == true then | |
| 2331 | UpdateGUI() | |
| 2332 | end | |
| 2333 | UpdateSkillsAndStuff() | |
| 2334 | if Walkspeed_Depends_On_Movement_Value == true then | |
| 2335 | if Movement.Value < 0 or StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true or Rooted.Value == true then | |
| 2336 | Humanoid.WalkSpeed = 0 | |
| 2337 | else | |
| 2338 | Humanoid.WalkSpeed = 16 * Movement.Value * Player_Size | |
| 2339 | end | |
| 2340 | end | |
| 2341 | if Enable_Stun == true and StunValue.Value >= Max_Stun then | |
| 2342 | StunValue.Value = 0 | |
| 2343 | Stun.Value = true | |
| 2344 | end | |
| 2345 | if Enable_Stagger_Hit == true then | |
| 2346 | if StaggerHit.Value == true and STAGGERHITANIM == false then | |
| 2347 | coroutine.resume(coroutine.create(function() | |
| 2348 | STAGGERHITANIM = true | |
| 2349 | while ATTACK == true do | |
| 2350 | Swait() | |
| 2351 | end | |
| 2352 | StaggerHitAnimation() | |
| 2353 | StaggerHit.Value = false | |
| 2354 | STAGGERHITANIM = false | |
| 2355 | end)) | |
| 2356 | end | |
| 2357 | else | |
| 2358 | StaggerHit.Value = false | |
| 2359 | end | |
| 2360 | if Enable_Stagger == true then | |
| 2361 | if Stagger.Value == true and STAGGERANIM == false then | |
| 2362 | coroutine.resume(coroutine.create(function() | |
| 2363 | STAGGERANIM = true | |
| 2364 | while ATTACK == true do | |
| 2365 | Swait() | |
| 2366 | end | |
| 2367 | StaggerAnimation() | |
| 2368 | Stagger.Value = false | |
| 2369 | STAGGERANIM = false | |
| 2370 | end)) | |
| 2371 | end | |
| 2372 | else | |
| 2373 | Stagger.Value = false | |
| 2374 | end | |
| 2375 | if Enable_Stun == true then | |
| 2376 | if Stun.Value == true and STUNANIM == false then | |
| 2377 | coroutine.resume(coroutine.create(function() | |
| 2378 | StunValue.Value = 0 | |
| 2379 | STUNANIM = true | |
| 2380 | while ATTACK == true do | |
| 2381 | Swait() | |
| 2382 | end | |
| 2383 | StunAnimation() | |
| 2384 | Stun.Value = false | |
| 2385 | STUNANIM = false | |
| 2386 | end)) | |
| 2387 | end | |
| 2388 | else | |
| 2389 | StunValue.Value = 0 | |
| 2390 | Stun.Value = false | |
| 2391 | end | |
| 2392 | if DONUMBER >= .5 then | |
| 2393 | HANDIDLE = true | |
| 2394 | elseif DONUMBER <= 0 then | |
| 2395 | HANDIDLE = false | |
| 2396 | end | |
| 2397 | if HANDIDLE == false then | |
| 2398 | DONUMBER = DONUMBER + 0.003 / Animation_Speed | |
| 2399 | else | |
| 2400 | DONUMBER = DONUMBER - 0.003 / Animation_Speed | |
| 2401 | end | |
| 2402 | if ATTACK == false then | |
| 2403 | IDLENUMBER = IDLENUMBER + 1 | |
| 2404 | else | |
| 2405 | IDLENUMBER = 0 | |
| 2406 | end | |
| 2407 | if Enable_Stats == true then | |
| 2408 | for _, v in pairs (ChangeStat:GetChildren()) do | |
| 2409 | if v:FindFirstChild("Duration") ~= nil then
| |
| 2410 | v:FindFirstChild("Duration").Value = v:FindFirstChild("Duration").Value - (1 / 30) / Animation_Speed
| |
| 2411 | if v:FindFirstChild("Duration").Value <= 0 then
| |
| 2412 | v.Parent = nil | |
| 2413 | end | |
| 2414 | end | |
| 2415 | if v.Name == "ChangeDefense" then | |
| 2416 | CHANGEDEFENSE = CHANGEDEFENSE + v.Value | |
| 2417 | elseif v.Name == "ChangeDamage" then | |
| 2418 | CHANGEDAMAGE = CHANGEDAMAGE + v.Value | |
| 2419 | elseif v.Name == "ChangeMovement" then | |
| 2420 | CHANGEMOVEMENT = CHANGEMOVEMENT + v.Value | |
| 2421 | end | |
| 2422 | end | |
| 2423 | Defense.Value = 1 + (CHANGEDEFENSE) | |
| 2424 | if Defense.Value <= 0.01 then | |
| 2425 | Defense.Value = 0.01 | |
| 2426 | end | |
| 2427 | Damage.Value = 1 + (CHANGEDAMAGE) | |
| 2428 | if Damage.Value <= 0 then | |
| 2429 | Damage.Value = 0 | |
| 2430 | end | |
| 2431 | Movement.Value = 1 + (CHANGEMOVEMENT) | |
| 2432 | if Movement.Value <= 0 then | |
| 2433 | Movement.Value = 0 | |
| 2434 | end | |
| 2435 | CHANGEDEFENSE = 0 | |
| 2436 | CHANGEDAMAGE = 0 | |
| 2437 | CHANGEMOVEMENT = 0 | |
| 2438 | end | |
| 2439 | SINE = SINE + CHANGE | |
| 2440 | local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude | |
| 2441 | local TORSOVERTICALVELOCITY = RootPart.Velocity.y | |
| 2442 | local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position) | |
| 2443 | local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character) | |
| 2444 | local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16) | |
| 2445 | if ANIM == "Walk" and EQUIPPED == true and TORSOVELOCITY > 1 then | |
| 2446 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.1 * COS(SINE / (WALKSPEEDVALUE / 2)) * Player_Size) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
| 2447 | Neck.C1 = Clerp(Neck.C1, CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
| 2448 | RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 0.875 * Player_Size - 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, -0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
| 2449 | LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 0.875 * Player_Size + 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, 0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
| 2450 | elseif (ANIM ~= "Walk" and EQUIPPED == true) or (TORSOVELOCITY < 1) then | |
| 2451 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2452 | Neck.C1 = Clerp(Neck.C1, CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2453 | RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2454 | LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2455 | end | |
| 2456 | if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then | |
| 2457 | ANIM = "Jump" | |
| 2458 | if EQUIPPED == true and ATTACK == false then | |
| 2459 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2460 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2461 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed) | |
| 2462 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
| 2463 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed) | |
| 2464 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed) | |
| 2465 | end | |
| 2466 | elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then | |
| 2467 | ANIM = "Fall" | |
| 2468 | if EQUIPPED == true and ATTACK == false then | |
| 2469 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2470 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2471 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed) | |
| 2472 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
| 2473 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed) | |
| 2474 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed) | |
| 2475 | end | |
| 2476 | elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then | |
| 2477 | ANIM = "Idle" | |
| 2478 | if EQUIPPED == true and ATTACK == false then | |
| 2479 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2480 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(10), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2481 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.45 * Player_Size, 0.5 * Player_Size, -1 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(-70)) * ANGLES(RAD(20), RAD(25), RAD(-15)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
| 2482 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1 * Player_Size, 0.2 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(25), RAD(0), RAD(55)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
| 2483 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2484 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2485 | end | |
| 2486 | elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then | |
| 2487 | ANIM = "Walk" | |
| 2488 | WALK = WALK + 1 / Animation_Speed | |
| 2489 | if WALK >= 15 - (5 * (Humanoid.WalkSpeed / 16 / Player_Size)) then | |
| 2490 | WALK = 0 | |
| 2491 | if WALKINGANIM == true then | |
| 2492 | WALKINGANIM = false | |
| 2493 | elseif WALKINGANIM == false then | |
| 2494 | WALKINGANIM = true | |
| 2495 | end | |
| 2496 | end | |
| 2497 | if EQUIPPED == true and ATTACK == false then | |
| 2498 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2499 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(10), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2500 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.45 * Player_Size, 0.5 * Player_Size, -1 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(-70)) * ANGLES(RAD(20), RAD(25), RAD(-15)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
| 2501 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1 * Player_Size, 0.2 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(25), RAD(0), RAD(55)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
| 2502 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2503 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2504 | end | |
| 2505 | end | |
| 2506 | ||
| 2507 | end | |
| 2508 | ||
| 2509 | --//=================================\\ | |
| 2510 | --\\=================================// | |
| 2511 | ||
| 2512 | ||
| 2513 | ||
| 2514 | ||
| 2515 | ||
| 2516 | --//====================================================\\-- | |
| 2517 | --|| END OF SCRIPT | |
| 2518 | --\\====================================================//-- |