SHOW:
|
|
- or go back to the newest paste.
| 1 | - | Player = game.Players.LocalPlayer |
| 1 | + | -- This script has been converted to FE by iPxter |
| 2 | ||
| 3 | ||
| 4 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
| |
| 5 | local Player,Mouse,mouse,UserInputService,ContextActionService = owner | |
| 6 | do | |
| 7 | print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
| |
| 8 | script.Parent = Player.Character | |
| 9 | ||
| 10 | --RemoteEvent for communicating | |
| 11 | local Event = Instance.new("RemoteEvent")
| |
| 12 | Event.Name = "UserInput_Event" | |
| 13 | ||
| 14 | --Fake event to make stuff like Mouse.KeyDown work | |
| 15 | local function fakeEvent() | |
| 16 | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
| |
| 17 | t.connect = t.Connect | |
| 18 | return t | |
| 19 | end | |
| 20 | ||
| 21 | --Creating fake input objects with fake variables | |
| 22 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
| |
| 23 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
| |
| 24 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
| |
| 25 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
| |
| 26 | end} | |
| 27 | --Merged 2 functions into one by checking amount of arguments | |
| 28 | CAS.UnbindAction = CAS.BindAction | |
| 29 | ||
| 30 | --This function will trigger the events that have been :Connect()'ed | |
| 31 | local function te(self,ev,...) | |
| 32 | local t = m[ev] | |
| 33 | if t and t._fakeEvent and t.Function then | |
| 34 | t.Function(...) | |
| 35 | end | |
| 36 | end | |
| 37 | m.TrigEvent = te | |
| 38 | UIS.TrigEvent = te | |
| 39 | ||
| 40 | Event.OnServerEvent:Connect(function(plr,io) | |
| 41 | if plr~=Player then return end | |
| 42 | if io.isMouse then | |
| 43 | m.Target = io.Target | |
| 44 | m.Hit = io.Hit | |
| 45 | else | |
| 46 | local b = io.UserInputState == Enum.UserInputState.Begin | |
| 47 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 48 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
| 49 | end | |
| 50 | for _,t in pairs(CAS.Actions) do | |
| 51 | for _,k in pairs(t.Keys) do | |
| 52 | if k==io.KeyCode then | |
| 53 | t.Function(t.Name,io.UserInputState,io) | |
| 54 | end | |
| 55 | end | |
| 56 | end | |
| 57 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
| 58 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
| 59 | end | |
| 60 | end) | |
| 61 | Event.Parent = NLS([==[ | |
| 62 | local Player = game:GetService("Players").LocalPlayer
| |
| 63 | local Event = script:WaitForChild("UserInput_Event")
| |
| 64 | ||
| 65 | local UIS = game:GetService("UserInputService")
| |
| 66 | local input = function(io,a) | |
| 67 | - | Player = game:GetService("Players").LocalPlayer
|
| 67 | + | if a then return end |
| 68 | --Since InputObject is a client-side instance, we create and pass table instead | |
| 69 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
| |
| 70 | end | |
| 71 | UIS.InputBegan:Connect(input) | |
| 72 | UIS.InputEnded:Connect(input) | |
| 73 | ||
| 74 | local Mouse = Player:GetMouse() | |
| 75 | local h,t | |
| 76 | --Give the server mouse data 30 times every second, but only if the values changed | |
| 77 | --If player is not moving their mouse, client won't fire events | |
| 78 | while wait(1/30) do | |
| 79 | if h~=Mouse.Hit or t~=Mouse.Target then | |
| 80 | h,t=Mouse.Hit,Mouse.Target | |
| 81 | Event:FireServer({isMouse=true,Target=t,Hit=h})
| |
| 82 | end | |
| 83 | end]==],Player.Character) | |
| 84 | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS | |
| 85 | end | |
| 86 | Player = owner | |
| 87 | Character = Player.Character | |
| 88 | local txt = Instance.new("BillboardGui", Character)
| |
| 89 | txt.Adornee = Character.Head | |
| 90 | txt.Name = "_status" | |
| 91 | txt.Size = UDim2.new(2, 0, 1.2, 0) | |
| 92 | txt.StudsOffset = Vector3.new(-9, 8, 0) | |
| 93 | local text = Instance.new("TextLabel", txt)
| |
| 94 | text.Size = UDim2.new(10, 0, 7, 0) | |
| 95 | text.FontSize = "Size24" | |
| 96 | text.TextScaled = true | |
| 97 | text.TextTransparency = 0 | |
| 98 | text.BackgroundTransparency = 1 | |
| 99 | text.TextTransparency = 0 | |
| 100 | text.TextStrokeTransparency = 0 | |
| 101 | text.Font = "Antique" | |
| 102 | text.TextStrokeColor3 = Color3.new(196, 40, 28) | |
| 103 | text.Text = "The Corrupted Doctor" | |
| 104 | script.Name = "The Corrupted Doctor" | |
| 105 | --//====================================================\\-- | |
| 106 | --|| CREATED BY SHACKLUSTER-EDITED BY PROMLG112 | |
| 107 | --\\====================================================//-- | |
| 108 | local chara = Character | |
| 109 | ||
| 110 | function chat(...) | |
| 111 | local txxt = {...}
| |
| 112 | local ch = coroutine.wrap(function() | |
| 113 | if chara:FindFirstChild("Chatt")~= nil then
| |
| 114 | Character:FindFirstChild("Chatt"):destroy()
| |
| 115 | end | |
| 116 | local txt = Instance.new("BillboardGui", chara)
| |
| 117 | txt.Adornee = chara.Head | |
| 118 | txt.Name = "Chatt" | |
| 119 | txt.Size = UDim2.new(2, 0, 1.2, 0) | |
| 120 | txt.StudsOffset = Vector3.new(-9, 7, 0) | |
| 121 | local text = Instance.new("TextLabel", txt)
| |
| 122 | text.Size = UDim2.new(10, 0, 7, 0) | |
| 123 | text.TextSize = 32 | |
| 124 | text.Font = Enum.Font.Antique | |
| 125 | text.TextScaled = false | |
| 126 | text.BackgroundTransparency = 1 | |
| 127 | text.TextColor3 = Color3.new(0,0,0) | |
| 128 | text.TextStrokeTransparency = 0 | |
| 129 | text.TextStrokeColor3 = Color3.new(0/0, 0/0, 0/0) | |
| 130 | text.Text = "" | |
| 131 | txxt = table.concat(txxt,"\t") | |
| 132 | for i = 1, #txxt do | |
| 133 | - | ff = Instance.new("ForceField", game.Players.LocalPlayer.Character)
|
| 133 | + | |
| 134 | ||
| 135 | end | |
| 136 | wait(2) | |
| 137 | for trans = 0,1,00.1 do | |
| 138 | text.TextTransparency = trans | |
| 139 | text.TextStrokeTransparency = trans | |
| 140 | wait() | |
| 141 | end | |
| 142 | wait() | |
| 143 | txt:destroy() | |
| 144 | end) | |
| 145 | ||
| 146 | ch(...) | |
| 147 | end | |
| 148 | Player.Chatted:connect(chat) | |
| 149 | ||
| 150 | wait(0.2) | |
| 151 | ||
| 152 | Player = owner | |
| 153 | PlayerGui = Player.PlayerGui | |
| 154 | Cam = workspace.CurrentCamera | |
| 155 | Backpack = Player.Backpack | |
| 156 | Character = Player.Character | |
| 157 | Humanoid = Character.Humanoid | |
| 158 | Mouse = Player:GetMouse() | |
| 159 | RootPart = Character["HumanoidRootPart"] | |
| 160 | Torso = Character["Torso"] | |
| 161 | Head = Character["Head"] | |
| 162 | RightArm = Character["Right Arm"] | |
| 163 | LeftArm = Character["Left Arm"] | |
| 164 | RightLeg = Character["Right Leg"] | |
| 165 | LeftLeg = Character["Left Leg"] | |
| 166 | RootJoint = RootPart["RootJoint"] | |
| 167 | Neck = Torso["Neck"] | |
| 168 | RightShoulder = Torso["Right Shoulder"] | |
| 169 | LeftShoulder = Torso["Left Shoulder"] | |
| 170 | RightHip = Torso["Right Hip"] | |
| 171 | LeftHip = Torso["Left Hip"] | |
| 172 | ||
| 173 | for i,v in pairs(Character:GetChildren()) do | |
| 174 | if v.ClassName == "Shirt" or v.ClassName == "Pants" or v.ClassName == "CharacterMesh" then | |
| 175 | v:Destroy() | |
| 176 | end | |
| 177 | end | |
| 178 | ||
| 179 | for i,v in pairs(Character:GetChildren()) do | |
| 180 | if v.ClassName == "Accessory" or v.ClassName == "Hat" then | |
| 181 | v:Destroy() | |
| 182 | end | |
| 183 | end | |
| 184 | ||
| 185 | local Shirt = Instance.new("Shirt",Character)
| |
| 186 | local Pants = Instance.new("Pants",Character)
| |
| 187 | Shirt.ShirtTemplate = "rbxassetid://648758131" | |
| 188 | Pants.PantsTemplate = "rbxassetid://472675863" | |
| 189 | ||
| 190 | local sick = Instance.new("Sound",Character)
| |
| 191 | sick.SoundId = "rbxassetid://561833161" | |
| 192 | sick.Looped = true | |
| 193 | sick.Pitch = 1 | |
| 194 | sick.Volume = 1.3 | |
| 195 | sick:Play() | |
| 196 | ||
| 197 | IT = Instance.new | |
| 198 | CF = CFrame.new | |
| 199 | VT = Vector3.new | |
| 200 | RAD = math.rad | |
| 201 | C3 = Color3.new | |
| 202 | UD2 = UDim2.new | |
| 203 | BRICKC = BrickColor.new | |
| 204 | ANGLES = CFrame.Angles | |
| 205 | EULER = CFrame.fromEulerAnglesXYZ | |
| 206 | COS = math.cos | |
| 207 | ACOS = math.acos | |
| 208 | SIN = math.sin | |
| 209 | ASIN = math.asin | |
| 210 | ABS = math.abs | |
| 211 | MRANDOM = math.random | |
| 212 | FLOOR = math.floor | |
| 213 | local CLOAKED = false | |
| 214 | local KILLINSTINCT = 0 | |
| 215 | --//=================================\\ | |
| 216 | --|| SOME OTHER STUFF | |
| 217 | --\\=================================// | |
| 218 | ff = Instance.new("ForceField", game.Players.owner.Character)
| |
| 219 | ff.Visible = false | |
| 220 | Humanoid.Name = "God Mode" | |
| 221 | ||
| 222 | --//=================================\\ | |
| 223 | --|| CUSTOMIZATION | |
| 224 | --\\=================================// | |
| 225 | ||
| 226 | Player_Size = 1 --Size of the player. | |
| 227 | Animation_Speed = 3 | |
| 228 | Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60) | |
| 229 | ||
| 230 | local Speed = 16 | |
| 231 | local Effects2 = {}
| |
| 232 | ||
| 233 | --//=================================\\ | |
| 234 | --|| END OF CUSTOMIZATION | |
| 235 | --\\=================================// | |
| 236 | ||
| 237 | local function weldBetween(a, b) | |
| 238 | local weldd = Instance.new("ManualWeld")
| |
| 239 | weldd.Part0 = a | |
| 240 | weldd.Part1 = b | |
| 241 | weldd.C0 = CFrame.new() | |
| 242 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
| 243 | weldd.Parent = a | |
| 244 | return weldd | |
| 245 | end | |
| 246 | --//=================================\\ | |
| 247 | --|| USEFUL VALUES | |
| 248 | --\\=================================// | |
| 249 | ||
| 250 | Animation_Speed = 3 | |
| 251 | Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60) | |
| 252 | local Speed = 16 | |
| 253 | local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
| 254 | local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
| 255 | local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) | |
| 256 | local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) | |
| 257 | local DAMAGEMULTIPLIER = 1 | |
| 258 | local ANIM = "Idle" | |
| 259 | local ATTACK = false | |
| 260 | local EQUIPPED = false | |
| 261 | local HOLD = false | |
| 262 | local CLOCKTARGET = nil | |
| 263 | local CLOCKSPEED = 2.5 | |
| 264 | local CLOCKLOOP = 0 | |
| 265 | local COMBO = 1 | |
| 266 | local Rooted = false | |
| 267 | local SINE = 0 | |
| 268 | local KEYHOLD = false | |
| 269 | local CHANGE = 2 / Animation_Speed | |
| 270 | local WALKINGANIM = false | |
| 271 | local VALUE1 = false | |
| 272 | local VALUE2 = false | |
| 273 | local ROBLOXIDLEANIMATION = IT("Animation")
| |
| 274 | ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation" | |
| 275 | ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571" | |
| 276 | --ROBLOXIDLEANIMATION.Parent = Humanoid | |
| 277 | local WEAPONGUI = IT("ScreenGui", PlayerGui)
| |
| 278 | - | ff = Instance.new("ForceField", game.Players.LocalPlayer.Character)
|
| 278 | + | |
| 279 | local Weapon = IT("Model")
| |
| 280 | Weapon.Name = "Adds" | |
| 281 | local Effects = IT("Folder", Weapon)
| |
| 282 | Effects.Name = "Effects" | |
| 283 | local ANIMATOR = Humanoid.Animator | |
| 284 | local ANIMATE = Character.Animate | |
| 285 | local UNANCHOR = true | |
| 286 | local ENERGYSOUND = 1417051162 | |
| 287 | local BEAMSOUND = 1417056781 | |
| 288 | local EXPLOSIONSOUND = 1417056081 | |
| 289 | ||
| 290 | --//=================================\\ | |
| 291 | --\\=================================// | |
| 292 | ||
| 293 | local asd = Instance.new("ParticleEmitter")
| |
| 294 | asd.Color = ColorSequence.new(Color3.new(0.5, 0, 0), Color3.new(.3, 0, 0)) | |
| 295 | asd.LightEmission = .1 | |
| 296 | asd.Texture = "http://www.roblox.com/asset/?ID=291880914" | |
| 297 | aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.6),NumberSequenceKeypoint.new(1, 2)})
| |
| 298 | bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)})
| |
| 299 | asd.Transparency = bbb | |
| 300 | asd.Size = aaa | |
| 301 | asd.ZOffset = .9 | |
| 302 | asd.Acceleration = Vector3.new(0, -15, 0) | |
| 303 | asd.LockedToPart = false | |
| 304 | asd.EmissionDirection = "Back" | |
| 305 | asd.Lifetime = NumberRange.new(1, 2) | |
| 306 | asd.Rotation = NumberRange.new(-100, 100) | |
| 307 | asd.RotSpeed = NumberRange.new(-100, 100) | |
| 308 | asd.Speed = NumberRange.new(10) | |
| 309 | asd.Enabled = false | |
| 310 | asd.VelocitySpread = 999 | |
| 311 | ||
| 312 | function getbloody(victim,amount) | |
| 313 | local PART = CreatePart(3, Effects, "Metal", 0, 1, "Mid gray", "Blood", victim.Size) | |
| 314 | PART.CFrame = victim.CFrame | |
| 315 | local HITPLAYERSOUNDS = {"356551938","264486467"}
| |
| 316 | Debris:AddItem(PART,5) | |
| 317 | CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10)) | |
| 318 | CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10)) | |
| 319 | CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10)) | |
| 320 | local prtcl = asd:Clone() | |
| 321 | prtcl.Parent = PART | |
| 322 | prtcl:Emit(amount*10) | |
| 323 | end | |
| 324 | ||
| 325 | --//=================================\\ | |
| 326 | --|| SAZERENOS' ARTIFICIAL HEARTBEAT | |
| 327 | --\\=================================// | |
| 328 | ||
| 329 | ArtificialHB = Instance.new("BindableEvent", script)
| |
| 330 | ArtificialHB.Name = "ArtificialHB" | |
| 331 | ||
| 332 | script:WaitForChild("ArtificialHB")
| |
| 333 | ||
| 334 | frame = Frame_Speed | |
| 335 | tf = 0 | |
| 336 | allowframeloss = false | |
| 337 | tossremainder = false | |
| 338 | lastframe = tick() | |
| 339 | script.ArtificialHB:Fire() | |
| 340 | ||
| 341 | game:GetService("RunService").Heartbeat:connect(function(s, p)
| |
| 342 | tf = tf + s | |
| 343 | if tf >= frame then | |
| 344 | if allowframeloss then | |
| 345 | script.ArtificialHB:Fire() | |
| 346 | lastframe = tick() | |
| 347 | else | |
| 348 | for i = 1, math.floor(tf / frame) do | |
| 349 | script.ArtificialHB:Fire() | |
| 350 | end | |
| 351 | lastframe = tick() | |
| 352 | end | |
| 353 | if tossremainder then | |
| 354 | tf = 0 | |
| 355 | else | |
| 356 | tf = tf - frame * math.floor(tf / frame) | |
| 357 | end | |
| 358 | end | |
| 359 | end) | |
| 360 | ||
| 361 | --//=================================\\ | |
| 362 | --\\=================================// | |
| 363 | ff = Instance.new("ForceField", game.Players.owner.Character)
| |
| 364 | ff.Visible = false | |
| 365 | Humanoid.Name = "God Mode" | |
| 366 | ||
| 367 | local l = game.Lighting | |
| 368 | local sky = Instance.new("Sky",l)
| |
| 369 | l.TimeOfDay = "00:00:00" | |
| 370 | l.Brightness = 1 | |
| 371 | l.Ambient = Color3.new(0.25, 0.5, 0.75) | |
| 372 | --- | |
| 373 | ||
| 374 | ||
| 375 | ||
| 376 | --//=================================\\ | |
| 377 | --|| SOME FUNCTIONS | |
| 378 | --\\=================================// | |
| 379 | function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS) | |
| 380 | return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS) | |
| 381 | end | |
| 382 | ||
| 383 | function PositiveAngle(NUMBER) | |
| 384 | if NUMBER >= 0 then | |
| 385 | NUMBER = 0 | |
| 386 | end | |
| 387 | return NUMBER | |
| 388 | end | |
| 389 | ||
| 390 | function NegativeAngle(NUMBER) | |
| 391 | if NUMBER <= 0 then | |
| 392 | NUMBER = 0 | |
| 393 | end | |
| 394 | return NUMBER | |
| 395 | end | |
| 396 | ||
| 397 | function Swait(NUMBER) | |
| 398 | if NUMBER == 0 or NUMBER == nil then | |
| 399 | ArtificialHB.Event:wait() | |
| 400 | else | |
| 401 | for i = 1, NUMBER do | |
| 402 | ArtificialHB.Event:wait() | |
| 403 | end | |
| 404 | end | |
| 405 | end | |
| 406 | ||
| 407 | function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET) | |
| 408 | local NEWMESH = IT(MESH) | |
| 409 | if MESH == "SpecialMesh" then | |
| 410 | NEWMESH.MeshType = MESHTYPE | |
| 411 | if MESHID ~= "nil" and MESHID ~= "" then | |
| 412 | NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID | |
| 413 | end | |
| 414 | if TEXTUREID ~= "nil" and TEXTUREID ~= "" then | |
| 415 | NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID | |
| 416 | end | |
| 417 | end | |
| 418 | NEWMESH.Offset = OFFSET or VT(0, 0, 0) | |
| 419 | NEWMESH.Scale = SCALE | |
| 420 | NEWMESH.Parent = PARENT | |
| 421 | return NEWMESH | |
| 422 | end | |
| 423 | ||
| 424 | function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR) | |
| 425 | local NEWPART = IT("Part")
| |
| 426 | NEWPART.formFactor = FORMFACTOR | |
| 427 | NEWPART.Reflectance = REFLECTANCE | |
| 428 | NEWPART.Transparency = TRANSPARENCY | |
| 429 | NEWPART.CanCollide = false | |
| 430 | NEWPART.Locked = true | |
| 431 | NEWPART.Anchored = true | |
| 432 | if ANCHOR == false then | |
| 433 | NEWPART.Anchored = false | |
| 434 | end | |
| 435 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
| 436 | NEWPART.Name = NAME | |
| 437 | NEWPART.Size = SIZE | |
| 438 | NEWPART.Position = Torso.Position | |
| 439 | NEWPART.Material = MATERIAL | |
| 440 | NEWPART:BreakJoints() | |
| 441 | NEWPART.Parent = PARENT | |
| 442 | return NEWPART | |
| 443 | end | |
| 444 | ||
| 445 | local function weldBetween(a, b) | |
| 446 | local weldd = Instance.new("ManualWeld")
| |
| 447 | weldd.Part0 = a | |
| 448 | weldd.Part1 = b | |
| 449 | weldd.C0 = CFrame.new() | |
| 450 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
| 451 | weldd.Parent = a | |
| 452 | return weldd | |
| 453 | end | |
| 454 | ||
| 455 | ||
| 456 | function QuaternionFromCFrame(cf) | |
| 457 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
| 458 | local trace = m00 + m11 + m22 | |
| 459 | if trace > 0 then | |
| 460 | local s = math.sqrt(1 + trace) | |
| 461 | local recip = 0.5 / s | |
| 462 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
| 463 | else | |
| 464 | local i = 0 | |
| 465 | if m11 > m00 then | |
| 466 | i = 1 | |
| 467 | end | |
| 468 | if m22 > (i == 0 and m00 or m11) then | |
| 469 | i = 2 | |
| 470 | end | |
| 471 | if i == 0 then | |
| 472 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
| 473 | local recip = 0.5 / s | |
| 474 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
| 475 | elseif i == 1 then | |
| 476 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
| 477 | local recip = 0.5 / s | |
| 478 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
| 479 | elseif i == 2 then | |
| 480 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
| 481 | local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
| 482 | end | |
| 483 | end | |
| 484 | end | |
| 485 | ||
| 486 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
| 487 | local xs, ys, zs = x + x, y + y, z + z | |
| 488 | local wx, wy, wz = w * xs, w * ys, w * zs | |
| 489 | local xx = x * xs | |
| 490 | local xy = x * ys | |
| 491 | local xz = x * zs | |
| 492 | local yy = y * ys | |
| 493 | local yz = y * zs | |
| 494 | local zz = z * zs | |
| 495 | 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)) | |
| 496 | end | |
| 497 | ||
| 498 | function QuaternionSlerp(a, b, t) | |
| 499 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
| 500 | local startInterp, finishInterp; | |
| 501 | if cosTheta >= 0.0001 then | |
| 502 | if (1 - cosTheta) > 0.0001 then | |
| 503 | local theta = ACOS(cosTheta) | |
| 504 | local invSinTheta = 1 / SIN(theta) | |
| 505 | startInterp = SIN((1 - t) * theta) * invSinTheta | |
| 506 | finishInterp = SIN(t * theta) * invSinTheta | |
| 507 | else | |
| 508 | startInterp = 1 - t | |
| 509 | finishInterp = t | |
| 510 | end | |
| 511 | else | |
| 512 | if (1 + cosTheta) > 0.0001 then | |
| 513 | local theta = ACOS(-cosTheta) | |
| 514 | local invSinTheta = 1 / SIN(theta) | |
| 515 | startInterp = SIN((t - 1) * theta) * invSinTheta | |
| 516 | finishInterp = SIN(t * theta) * invSinTheta | |
| 517 | else | |
| 518 | startInterp = t - 1 | |
| 519 | finishInterp = t | |
| 520 | end | |
| 521 | end | |
| 522 | 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 | |
| 523 | end | |
| 524 | ||
| 525 | function Clerp(a, b, t) | |
| 526 | local qa = {QuaternionFromCFrame(a)}
| |
| 527 | local qb = {QuaternionFromCFrame(b)}
| |
| 528 | local ax, ay, az = a.x, a.y, a.z | |
| 529 | local bx, by, bz = b.x, b.y, b.z | |
| 530 | local _t = 1 - t | |
| 531 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
| 532 | end | |
| 533 | ||
| 534 | function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME) | |
| 535 | local frame = IT("Frame")
| |
| 536 | frame.BackgroundTransparency = TRANSPARENCY | |
| 537 | frame.BorderSizePixel = BORDERSIZEPIXEL | |
| 538 | frame.Position = POSITION | |
| 539 | frame.Size = SIZE | |
| 540 | frame.BackgroundColor3 = COLOR | |
| 541 | frame.BorderColor3 = BORDERCOLOR | |
| 542 | frame.Name = NAME | |
| 543 | frame.Parent = PARENT | |
| 544 | return frame | |
| 545 | end | |
| 546 | ||
| 547 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
| 548 | local label = IT("TextLabel")
| |
| 549 | label.BackgroundTransparency = 1 | |
| 550 | label.Size = UD2(1, 0, 1, 0) | |
| 551 | label.Position = UD2(0, 0, 0, 0) | |
| 552 | label.TextColor3 = TEXTCOLOR | |
| 553 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
| 554 | label.TextTransparency = TRANSPARENCY | |
| 555 | label.FontSize = TEXTFONTSIZE | |
| 556 | label.Font = TEXTFONT | |
| 557 | label.BorderSizePixel = BORDERSIZEPIXEL | |
| 558 | label.TextStrokeColor3 = C3(1,1,1) | |
| 559 | label.TextScaled = false | |
| 560 | label.Text = TEXT | |
| 561 | label.Name = NAME | |
| 562 | label.Parent = PARENT | |
| 563 | return label | |
| 564 | end | |
| 565 | ||
| 566 | function NoOutlines(PART) | |
| 567 | PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10 | |
| 568 | end | |
| 569 | ||
| 570 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
| 571 | local NEWWELD = IT(TYPE) | |
| 572 | NEWWELD.Part0 = PART0 | |
| 573 | NEWWELD.Part1 = PART1 | |
| 574 | NEWWELD.C0 = C0 | |
| 575 | NEWWELD.C1 = C1 | |
| 576 | NEWWELD.Parent = PARENT | |
| 577 | return NEWWELD | |
| 578 | end | |
| 579 | ||
| 580 | local S = IT("Sound")
| |
| 581 | function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP) | |
| 582 | local NEWSOUND = nil | |
| 583 | coroutine.resume(coroutine.create(function() | |
| 584 | NEWSOUND = S:Clone() | |
| 585 | NEWSOUND.Parent = PARENT | |
| 586 | NEWSOUND.Volume = VOLUME | |
| 587 | NEWSOUND.Pitch = PITCH | |
| 588 | NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID | |
| 589 | NEWSOUND:play() | |
| 590 | if DOESLOOP == true then | |
| 591 | NEWSOUND.Looped = true | |
| 592 | else | |
| 593 | repeat wait(1) until NEWSOUND.Playing == false | |
| 594 | NEWSOUND:remove() | |
| 595 | end | |
| 596 | end)) | |
| 597 | return NEWSOUND | |
| 598 | end | |
| 599 | ||
| 600 | function CFrameFromTopBack(at, top, back) | |
| 601 | local right = top:Cross(back) | |
| 602 | 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) | |
| 603 | end | |
| 604 | ||
| 605 | --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
| |
| 606 | function WACKYEFFECT(Table) | |
| 607 | local TYPE = (Table.EffectType or "Sphere") | |
| 608 | local SIZE = (Table.Size or VT(1,1,1)) | |
| 609 | local ENDSIZE = (Table.Size2 or VT(0,0,0)) | |
| 610 | local TRANSPARENCY = (Table.Transparency or 0) | |
| 611 | local ENDTRANSPARENCY = (Table.Transparency2 or 1) | |
| 612 | local CFRAME = (Table.CFrame or Torso.CFrame) | |
| 613 | local MOVEDIRECTION = (Table.MoveToPos or nil) | |
| 614 | local ROTATION1 = (Table.RotationX or 0) | |
| 615 | local ROTATION2 = (Table.RotationY or 0) | |
| 616 | local ROTATION3 = (Table.RotationZ or 0) | |
| 617 | local MATERIAL = (Table.Material or "Neon") | |
| 618 | local COLOR = (Table.Color or C3(1,1,1)) | |
| 619 | local TIME = (Table.Time or 45) | |
| 620 | local SOUNDID = (Table.SoundID or nil) | |
| 621 | local SOUNDPITCH = (Table.SoundPitch or nil) | |
| 622 | local SOUNDVOLUME = (Table.SoundVolume or nil) | |
| 623 | coroutine.resume(coroutine.create(function() | |
| 624 | local PLAYSSOUND = false | |
| 625 | local SOUND = nil | |
| 626 | local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
| |
| 627 | if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then | |
| 628 | PLAYSSOUND = true | |
| 629 | SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false) | |
| 630 | end | |
| 631 | EFFECT.Color = COLOR | |
| 632 | local MSH = nil | |
| 633 | if TYPE == "Sphere" then | |
| 634 | MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
| |
| 635 | elseif TYPE == "Block" then | |
| 636 | MSH = IT("BlockMesh",EFFECT)
| |
| 637 | MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X) | |
| 638 | elseif TYPE == "Wave" then | |
| 639 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
| |
| 640 | elseif TYPE == "Ring" then | |
| 641 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
| |
| 642 | elseif TYPE == "Slash" then | |
| 643 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
| |
| 644 | elseif TYPE == "Round Slash" then | |
| 645 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
| |
| 646 | elseif TYPE == "Swirl" then | |
| 647 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
| |
| 648 | elseif TYPE == "Skull" then | |
| 649 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
| |
| 650 | elseif TYPE == "Crystal" then | |
| 651 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
| |
| 652 | end | |
| 653 | if MSH ~= nil then | |
| 654 | local MOVESPEED = nil | |
| 655 | if MOVEDIRECTION ~= nil then | |
| 656 | MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME | |
| 657 | end | |
| 658 | local GROWTH = SIZE - ENDSIZE | |
| 659 | local TRANS = TRANSPARENCY - ENDTRANSPARENCY | |
| 660 | if TYPE == "Block" then | |
| 661 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
| 662 | else | |
| 663 | EFFECT.CFrame = CFRAME | |
| 664 | end | |
| 665 | for LOOP = 1, TIME+1 do | |
| 666 | Swait() | |
| 667 | MSH.Scale = MSH.Scale - GROWTH/TIME | |
| 668 | if TYPE == "Wave" then | |
| 669 | MSH.Offset = VT(0,0,-MSH.Scale.X/8) | |
| 670 | end | |
| 671 | EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME | |
| 672 | if TYPE == "Block" then | |
| 673 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
| 674 | else | |
| 675 | EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3)) | |
| 676 | end | |
| 677 | if MOVEDIRECTION ~= nil then | |
| 678 | local ORI = EFFECT.Orientation | |
| 679 | EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED) | |
| 680 | EFFECT.Orientation = ORI | |
| 681 | end | |
| 682 | end | |
| 683 | if PLAYSSOUND == false then | |
| 684 | EFFECT:remove() | |
| 685 | else | |
| 686 | repeat Swait() until SOUND.Playing == false | |
| 687 | EFFECT:remove() | |
| 688 | end | |
| 689 | else | |
| 690 | if PLAYSSOUND == false then | |
| 691 | EFFECT:remove() | |
| 692 | else | |
| 693 | repeat Swait() until SOUND.Playing == false | |
| 694 | EFFECT:remove() | |
| 695 | end | |
| 696 | end | |
| 697 | end)) | |
| 698 | end | |
| 699 | ||
| 700 | function MakeForm(PART,TYPE) | |
| 701 | if TYPE == "Cyl" then | |
| 702 | local MSH = IT("CylinderMesh",PART)
| |
| 703 | elseif TYPE == "Ball" then | |
| 704 | local MSH = IT("SpecialMesh",PART)
| |
| 705 | MSH.MeshType = "Sphere" | |
| 706 | elseif TYPE == "Wedge" then | |
| 707 | local MSH = IT("SpecialMesh",PART)
| |
| 708 | MSH.MeshType = "Wedge" | |
| 709 | end | |
| 710 | end | |
| 711 | ||
| 712 | Debris = game:GetService("Debris")
| |
| 713 | ||
| 714 | function CastProperRay(StartPos, EndPos, Distance, Ignore) | |
| 715 | local DIRECTION = CF(StartPos,EndPos).lookVector | |
| 716 | return Raycast(StartPos, DIRECTION, Distance, Ignore) | |
| 717 | end | |
| 718 | ||
| 719 | function turnto(position) | |
| 720 | RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0) | |
| 721 | end | |
| 722 | ||
| 723 | function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS) | |
| 724 | return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS) | |
| 725 | end | |
| 726 | ||
| 727 | function PositiveAngle(NUMBER) | |
| 728 | if NUMBER >= 0 then | |
| 729 | NUMBER = 0 | |
| 730 | end | |
| 731 | return NUMBER | |
| 732 | end | |
| 733 | ||
| 734 | function NegativeAngle(NUMBER) | |
| 735 | if NUMBER <= 0 then | |
| 736 | NUMBER = 0 | |
| 737 | end | |
| 738 | return NUMBER | |
| 739 | end | |
| 740 | ||
| 741 | function Swait(NUMBER) | |
| 742 | if NUMBER == 0 or NUMBER == nil then | |
| 743 | ArtificialHB.Event:wait() | |
| 744 | else | |
| 745 | for i = 1, NUMBER do | |
| 746 | ArtificialHB.Event:wait() | |
| 747 | end | |
| 748 | end | |
| 749 | end | |
| 750 | ||
| 751 | function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET) | |
| 752 | local NEWMESH = IT(MESH) | |
| 753 | if MESH == "SpecialMesh" then | |
| 754 | NEWMESH.MeshType = MESHTYPE | |
| 755 | if MESHID ~= "nil" and MESHID ~= "" then | |
| 756 | NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID | |
| 757 | end | |
| 758 | if TEXTUREID ~= "nil" and TEXTUREID ~= "" then | |
| 759 | NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID | |
| 760 | end | |
| 761 | end | |
| 762 | NEWMESH.Offset = OFFSET or VT(0, 0, 0) | |
| 763 | NEWMESH.Scale = SCALE | |
| 764 | NEWMESH.Parent = PARENT | |
| 765 | return NEWMESH | |
| 766 | end | |
| 767 | ||
| 768 | function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR) | |
| 769 | local NEWPART = IT("Part")
| |
| 770 | NEWPART.formFactor = FORMFACTOR | |
| 771 | NEWPART.Reflectance = REFLECTANCE | |
| 772 | NEWPART.Transparency = TRANSPARENCY | |
| 773 | NEWPART.CanCollide = false | |
| 774 | NEWPART.Locked = true | |
| 775 | NEWPART.Anchored = true | |
| 776 | if ANCHOR == false then | |
| 777 | NEWPART.Anchored = false | |
| 778 | end | |
| 779 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
| 780 | NEWPART.Name = NAME | |
| 781 | NEWPART.Size = SIZE | |
| 782 | NEWPART.Position = Torso.Position | |
| 783 | NEWPART.Material = MATERIAL | |
| 784 | NEWPART:BreakJoints() | |
| 785 | NEWPART.Parent = PARENT | |
| 786 | return NEWPART | |
| 787 | end | |
| 788 | ||
| 789 | local function weldBetween(a, b) | |
| 790 | local weldd = Instance.new("ManualWeld")
| |
| 791 | weldd.Part0 = a | |
| 792 | weldd.Part1 = b | |
| 793 | weldd.C0 = CFrame.new() | |
| 794 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
| 795 | weldd.Parent = a | |
| 796 | return weldd | |
| 797 | end | |
| 798 | ||
| 799 | ||
| 800 | function QuaternionFromCFrame(cf) | |
| 801 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
| 802 | local trace = m00 + m11 + m22 | |
| 803 | if trace > 0 then | |
| 804 | local s = math.sqrt(1 + trace) | |
| 805 | local recip = 0.5 / s | |
| 806 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
| 807 | else | |
| 808 | local i = 0 | |
| 809 | if m11 > m00 then | |
| 810 | i = 1 | |
| 811 | end | |
| 812 | if m22 > (i == 0 and m00 or m11) then | |
| 813 | i = 2 | |
| 814 | end | |
| 815 | if i == 0 then | |
| 816 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
| 817 | local recip = 0.5 / s | |
| 818 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
| 819 | elseif i == 1 then | |
| 820 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
| 821 | local recip = 0.5 / s | |
| 822 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
| 823 | elseif i == 2 then | |
| 824 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
| 825 | local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
| 826 | end | |
| 827 | end | |
| 828 | end | |
| 829 | ||
| 830 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
| 831 | local xs, ys, zs = x + x, y + y, z + z | |
| 832 | local wx, wy, wz = w * xs, w * ys, w * zs | |
| 833 | local xx = x * xs | |
| 834 | local xy = x * ys | |
| 835 | local xz = x * zs | |
| 836 | local yy = y * ys | |
| 837 | local yz = y * zs | |
| 838 | local zz = z * zs | |
| 839 | 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)) | |
| 840 | end | |
| 841 | ||
| 842 | function QuaternionSlerp(a, b, t) | |
| 843 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
| 844 | local startInterp, finishInterp; | |
| 845 | if cosTheta >= 0.0001 then | |
| 846 | if (1 - cosTheta) > 0.0001 then | |
| 847 | local theta = ACOS(cosTheta) | |
| 848 | local invSinTheta = 1 / SIN(theta) | |
| 849 | startInterp = SIN((1 - t) * theta) * invSinTheta | |
| 850 | finishInterp = SIN(t * theta) * invSinTheta | |
| 851 | else | |
| 852 | startInterp = 1 - t | |
| 853 | finishInterp = t | |
| 854 | end | |
| 855 | else | |
| 856 | if (1 + cosTheta) > 0.0001 then | |
| 857 | local theta = ACOS(-cosTheta) | |
| 858 | local invSinTheta = 1 / SIN(theta) | |
| 859 | startInterp = SIN((t - 1) * theta) * invSinTheta | |
| 860 | finishInterp = SIN(t * theta) * invSinTheta | |
| 861 | else | |
| 862 | startInterp = t - 1 | |
| 863 | finishInterp = t | |
| 864 | end | |
| 865 | end | |
| 866 | 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 | |
| 867 | end | |
| 868 | ||
| 869 | function Clerp(a, b, t) | |
| 870 | local qa = {QuaternionFromCFrame(a)}
| |
| 871 | local qb = {QuaternionFromCFrame(b)}
| |
| 872 | local ax, ay, az = a.x, a.y, a.z | |
| 873 | local bx, by, bz = b.x, b.y, b.z | |
| 874 | local _t = 1 - t | |
| 875 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
| 876 | end | |
| 877 | ||
| 878 | function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME) | |
| 879 | local frame = IT("Frame")
| |
| 880 | frame.BackgroundTransparency = TRANSPARENCY | |
| 881 | frame.BorderSizePixel = BORDERSIZEPIXEL | |
| 882 | frame.Position = POSITION | |
| 883 | frame.Size = SIZE | |
| 884 | frame.BackgroundColor3 = COLOR | |
| 885 | frame.BorderColor3 = BORDERCOLOR | |
| 886 | frame.Name = NAME | |
| 887 | frame.Parent = PARENT | |
| 888 | return frame | |
| 889 | end | |
| 890 | ||
| 891 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
| 892 | local label = IT("TextLabel")
| |
| 893 | label.BackgroundTransparency = 1 | |
| 894 | label.Size = UD2(1, 0, 1, 0) | |
| 895 | label.Position = UD2(0, 0, 0, 0) | |
| 896 | label.TextColor3 = TEXTCOLOR | |
| 897 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
| 898 | label.TextTransparency = TRANSPARENCY | |
| 899 | label.FontSize = TEXTFONTSIZE | |
| 900 | label.Font = TEXTFONT | |
| 901 | label.BorderSizePixel = BORDERSIZEPIXEL | |
| 902 | label.TextScaled = false | |
| 903 | label.Text = TEXT | |
| 904 | label.Name = NAME | |
| 905 | label.Parent = PARENT | |
| 906 | return label | |
| 907 | end | |
| 908 | ||
| 909 | function NoOutlines(PART) | |
| 910 | PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10 | |
| 911 | end | |
| 912 | ||
| 913 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
| 914 | local NEWWELD = IT(TYPE) | |
| 915 | NEWWELD.Part0 = PART0 | |
| 916 | NEWWELD.Part1 = PART1 | |
| 917 | NEWWELD.C0 = C0 | |
| 918 | NEWWELD.C1 = C1 | |
| 919 | NEWWELD.Parent = PARENT | |
| 920 | return NEWWELD | |
| 921 | end | |
| 922 | ||
| 923 | local S = IT("Sound")
| |
| 924 | function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP) | |
| 925 | local NEWSOUND = nil | |
| 926 | coroutine.resume(coroutine.create(function() | |
| 927 | NEWSOUND = S:Clone() | |
| 928 | NEWSOUND.Parent = PARENT | |
| 929 | NEWSOUND.Volume = VOLUME | |
| 930 | NEWSOUND.Pitch = PITCH | |
| 931 | NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID | |
| 932 | NEWSOUND:play() | |
| 933 | if DOESLOOP == true then | |
| 934 | NEWSOUND.Looped = true | |
| 935 | else | |
| 936 | repeat wait(1) until NEWSOUND.Playing == false | |
| 937 | NEWSOUND:remove() | |
| 938 | end | |
| 939 | end)) | |
| 940 | return NEWSOUND | |
| 941 | end | |
| 942 | ||
| 943 | function CFrameFromTopBack(at, top, back) | |
| 944 | local right = top:Cross(back) | |
| 945 | 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) | |
| 946 | end | |
| 947 | ||
| 948 | --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
| |
| 949 | function WACKYEFFECT(Table) | |
| 950 | local TYPE = (Table.EffectType or "Sphere") | |
| 951 | local SIZE = (Table.Size or VT(1,1,1)) | |
| 952 | local ENDSIZE = (Table.Size2 or VT(0,0,0)) | |
| 953 | local TRANSPARENCY = (Table.Transparency or 0) | |
| 954 | local ENDTRANSPARENCY = (Table.Transparency2 or 1) | |
| 955 | local CFRAME = (Table.CFrame or Torso.CFrame) | |
| 956 | local MOVEDIRECTION = (Table.MoveToPos or nil) | |
| 957 | local ROTATION1 = (Table.RotationX or 0) | |
| 958 | local ROTATION2 = (Table.RotationY or 0) | |
| 959 | local ROTATION3 = (Table.RotationZ or 0) | |
| 960 | local MATERIAL = (Table.Material or "Neon") | |
| 961 | local COLOR = (Table.Color or C3(1,1,1)) | |
| 962 | local TIME = (Table.Time or 45) | |
| 963 | local SOUNDID = (Table.SoundID or nil) | |
| 964 | local SOUNDPITCH = (Table.SoundPitch or nil) | |
| 965 | local SOUNDVOLUME = (Table.SoundVolume or nil) | |
| 966 | coroutine.resume(coroutine.create(function() | |
| 967 | local PLAYSSOUND = false | |
| 968 | local SOUND = nil | |
| 969 | local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
| |
| 970 | if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then | |
| 971 | PLAYSSOUND = true | |
| 972 | SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false) | |
| 973 | end | |
| 974 | EFFECT.Color = COLOR | |
| 975 | local MSH = nil | |
| 976 | if TYPE == "Sphere" then | |
| 977 | MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
| |
| 978 | elseif TYPE == "Block" then | |
| 979 | MSH = IT("BlockMesh",EFFECT)
| |
| 980 | MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X) | |
| 981 | elseif TYPE == "Wave" then | |
| 982 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
| |
| 983 | elseif TYPE == "Ring" then | |
| 984 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
| |
| 985 | elseif TYPE == "Slash" then | |
| 986 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
| |
| 987 | elseif TYPE == "Round Slash" then | |
| 988 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
| |
| 989 | elseif TYPE == "Swirl" then | |
| 990 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
| |
| 991 | elseif TYPE == "Skull" then | |
| 992 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
| |
| 993 | elseif TYPE == "Crystal" then | |
| 994 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
| |
| 995 | end | |
| 996 | if MSH ~= nil then | |
| 997 | local MOVESPEED = nil | |
| 998 | if MOVEDIRECTION ~= nil then | |
| 999 | MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME | |
| 1000 | end | |
| 1001 | local GROWTH = SIZE - ENDSIZE | |
| 1002 | local TRANS = TRANSPARENCY - ENDTRANSPARENCY | |
| 1003 | if TYPE == "Block" then | |
| 1004 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
| 1005 | else | |
| 1006 | EFFECT.CFrame = CFRAME | |
| 1007 | end | |
| 1008 | for LOOP = 1, TIME+1 do | |
| 1009 | Swait() | |
| 1010 | MSH.Scale = MSH.Scale - GROWTH/TIME | |
| 1011 | if TYPE == "Wave" then | |
| 1012 | MSH.Offset = VT(0,0,-MSH.Scale.X/8) | |
| 1013 | end | |
| 1014 | EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME | |
| 1015 | if TYPE == "Block" then | |
| 1016 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
| 1017 | else | |
| 1018 | EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3)) | |
| 1019 | end | |
| 1020 | if MOVEDIRECTION ~= nil then | |
| 1021 | local ORI = EFFECT.Orientation | |
| 1022 | EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED) | |
| 1023 | EFFECT.Orientation = ORI | |
| 1024 | end | |
| 1025 | end | |
| 1026 | if PLAYSSOUND == false then | |
| 1027 | EFFECT:remove() | |
| 1028 | else | |
| 1029 | SOUND.Stopped:Connect(function() | |
| 1030 | EFFECT:remove() | |
| 1031 | end) | |
| 1032 | end | |
| 1033 | else | |
| 1034 | if PLAYSSOUND == false then | |
| 1035 | EFFECT:remove() | |
| 1036 | else | |
| 1037 | repeat Swait() until SOUND.Playing == false | |
| 1038 | EFFECT:remove() | |
| 1039 | end | |
| 1040 | end | |
| 1041 | end)) | |
| 1042 | end | |
| 1043 | ||
| 1044 | function MakeForm(PART,TYPE) | |
| 1045 | if TYPE == "Cyl" then | |
| 1046 | local MSH = IT("CylinderMesh",PART)
| |
| 1047 | elseif TYPE == "Ball" then | |
| 1048 | local MSH = IT("SpecialMesh",PART)
| |
| 1049 | MSH.MeshType = "Sphere" | |
| 1050 | elseif TYPE == "Wedge" then | |
| 1051 | local MSH = IT("SpecialMesh",PART)
| |
| 1052 | MSH.MeshType = "Wedge" | |
| 1053 | end | |
| 1054 | end | |
| 1055 | ||
| 1056 | Debris = game:GetService("Debris")
| |
| 1057 | ||
| 1058 | function CastProperRay(StartPos, EndPos, Distance, Ignore) | |
| 1059 | local DIRECTION = CF(StartPos,EndPos).lookVector | |
| 1060 | return Raycast(StartPos, DIRECTION, Distance, Ignore) | |
| 1061 | end | |
| 1062 | ||
| 1063 | local EyeSizes={
| |
| 1064 | NumberSequenceKeypoint.new(0,1,0), | |
| 1065 | NumberSequenceKeypoint.new(1,0,0) | |
| 1066 | } | |
| 1067 | local EyeTrans={
| |
| 1068 | NumberSequenceKeypoint.new(0,0.8,0), | |
| 1069 | NumberSequenceKeypoint.new(1,1,0) | |
| 1070 | } | |
| 1071 | local PE=Instance.new("ParticleEmitter",nil)
| |
| 1072 | PE.LightEmission=.8 | |
| 1073 | PE.Color = ColorSequence.new(BRICKC("Black").Color)
| |
| 1074 | PE.Size=NumberSequence.new(EyeSizes) | |
| 1075 | PE.Transparency=NumberSequence.new(EyeTrans) | |
| 1076 | PE.Lifetime=NumberRange.new(0.35,1.5) | |
| 1077 | PE.Rotation=NumberRange.new(0,360) | |
| 1078 | PE.Rate=999 | |
| 1079 | PE.VelocitySpread = 10000 | |
| 1080 | PE.Acceleration = Vector3.new(0,0,0) | |
| 1081 | PE.Drag = 5 | |
| 1082 | PE.Speed = NumberRange.new(0,0,0) | |
| 1083 | PE.Texture="http://www.roblox.com/asset/?id=1351966707" | |
| 1084 | PE.ZOffset = -0 | |
| 1085 | PE.Name = "PE" | |
| 1086 | PE.Enabled = false | |
| 1087 | ||
| 1088 | function particles(art) | |
| 1089 | local PARTICLES = PE:Clone() | |
| 1090 | PARTICLES.Parent = art | |
| 1091 | end | |
| 1092 | ||
| 1093 | function CreateDebreeRing(FLOOR,POSITION,SIZE,BLOCKSIZE,SWAIT) | |
| 1094 | if FLOOR ~= nil then | |
| 1095 | coroutine.resume(coroutine.create(function() | |
| 1096 | local PART = CreatePart(3, Effects, "Plastic", 0, 1, "Pearl", "DebreeCenter", VT(0,0,0)) | |
| 1097 | PART.CFrame = CF(POSITION) | |
| 1098 | for i = 1, 45 do | |
| 1099 | local RingPiece = CreatePart(3, Effects, "Plastic", 0, 0, "Pearl", "DebreePart", BLOCKSIZE) | |
| 1100 | RingPiece.Material = FLOOR.Material | |
| 1101 | RingPiece.Color = FLOOR.Color | |
| 1102 | RingPiece.CFrame = PART.CFrame * ANGLES(RAD(0), RAD(i*8), RAD(0)) * CF(SIZE, 0, 0) * ANGLES(RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360))) | |
| 1103 | Debris:AddItem(RingPiece,SWAIT) | |
| 1104 | end | |
| 1105 | PART:remove() | |
| 1106 | end)) | |
| 1107 | end | |
| 1108 | end | |
| 1109 | ||
| 1110 | function CreateFlyingDebree(FLOOR,POSITION,AMOUNT,BLOCKSIZE,SWAIT,STRENGTH) | |
| 1111 | if FLOOR ~= nil then | |
| 1112 | for i = 1, AMOUNT do | |
| 1113 | local DEBREE = CreatePart(3, Effects, "Neon", FLOOR.Reflectance, FLOOR.Transparency, "Peal", "Debree", BLOCKSIZE, false) | |
| 1114 | DEBREE.Material = FLOOR.Material | |
| 1115 | DEBREE.Color = FLOOR.Color | |
| 1116 | DEBREE.CFrame = POSITION * ANGLES(RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360))) | |
| 1117 | DEBREE.Velocity = VT(MRANDOM(-STRENGTH,STRENGTH),MRANDOM(-STRENGTH,STRENGTH),MRANDOM(-STRENGTH,STRENGTH)) | |
| 1118 | coroutine.resume(coroutine.create(function() | |
| 1119 | Swait(15) | |
| 1120 | DEBREE.Parent = workspace | |
| 1121 | DEBREE.CanCollide = true | |
| 1122 | Debris:AddItem(DEBREE,SWAIT) | |
| 1123 | end)) | |
| 1124 | end | |
| 1125 | end | |
| 1126 | end | |
| 1127 | ||
| 1128 | function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS) | |
| 1129 | return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS) | |
| 1130 | end | |
| 1131 | ||
| 1132 | function PositiveAngle(NUMBER) | |
| 1133 | if NUMBER >= 0 then | |
| 1134 | NUMBER = 0 | |
| 1135 | end | |
| 1136 | return NUMBER | |
| 1137 | end | |
| 1138 | ||
| 1139 | function NegativeAngle(NUMBER) | |
| 1140 | if NUMBER <= 0 then | |
| 1141 | NUMBER = 0 | |
| 1142 | end | |
| 1143 | return NUMBER | |
| 1144 | end | |
| 1145 | ||
| 1146 | function Swait(NUMBER) | |
| 1147 | if NUMBER == 0 or NUMBER == nil then | |
| 1148 | ArtificialHB.Event:wait() | |
| 1149 | else | |
| 1150 | for i = 1, NUMBER do | |
| 1151 | ArtificialHB.Event:wait() | |
| 1152 | end | |
| 1153 | end | |
| 1154 | end | |
| 1155 | ||
| 1156 | function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET) | |
| 1157 | local NEWMESH = IT(MESH) | |
| 1158 | if MESH == "SpecialMesh" then | |
| 1159 | NEWMESH.MeshType = MESHTYPE | |
| 1160 | if MESHID ~= "nil" and MESHID ~= "" then | |
| 1161 | NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID | |
| 1162 | end | |
| 1163 | if TEXTUREID ~= "nil" and TEXTUREID ~= "" then | |
| 1164 | NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID | |
| 1165 | end | |
| 1166 | end | |
| 1167 | NEWMESH.Offset = OFFSET or VT(0, 0, 0) | |
| 1168 | NEWMESH.Scale = SCALE | |
| 1169 | NEWMESH.Parent = PARENT | |
| 1170 | return NEWMESH | |
| 1171 | end | |
| 1172 | ||
| 1173 | function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR) | |
| 1174 | local NEWPART = IT("Part")
| |
| 1175 | NEWPART.formFactor = FORMFACTOR | |
| 1176 | NEWPART.Reflectance = REFLECTANCE | |
| 1177 | NEWPART.Transparency = TRANSPARENCY | |
| 1178 | NEWPART.CanCollide = false | |
| 1179 | NEWPART.Locked = true | |
| 1180 | NEWPART.Anchored = true | |
| 1181 | if ANCHOR == false then | |
| 1182 | NEWPART.Anchored = false | |
| 1183 | end | |
| 1184 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
| 1185 | NEWPART.Name = NAME | |
| 1186 | NEWPART.Size = SIZE | |
| 1187 | NEWPART.Position = Torso.Position | |
| 1188 | NEWPART.Material = MATERIAL | |
| 1189 | NEWPART:BreakJoints() | |
| 1190 | NEWPART.Parent = PARENT | |
| 1191 | return NEWPART | |
| 1192 | end | |
| 1193 | ||
| 1194 | local function weldBetween(a, b) | |
| 1195 | local weldd = Instance.new("ManualWeld")
| |
| 1196 | weldd.Part0 = a | |
| 1197 | weldd.Part1 = b | |
| 1198 | weldd.C0 = CFrame.new() | |
| 1199 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
| 1200 | weldd.Parent = a | |
| 1201 | return weldd | |
| 1202 | end | |
| 1203 | ||
| 1204 | ||
| 1205 | function QuaternionFromCFrame(cf) | |
| 1206 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
| 1207 | local trace = m00 + m11 + m22 | |
| 1208 | if trace > 0 then | |
| 1209 | local s = math.sqrt(1 + trace) | |
| 1210 | local recip = 0.5 / s | |
| 1211 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
| 1212 | else | |
| 1213 | local i = 0 | |
| 1214 | if m11 > m00 then | |
| 1215 | i = 1 | |
| 1216 | end | |
| 1217 | if m22 > (i == 0 and m00 or m11) then | |
| 1218 | i = 2 | |
| 1219 | end | |
| 1220 | if i == 0 then | |
| 1221 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
| 1222 | local recip = 0.5 / s | |
| 1223 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
| 1224 | elseif i == 1 then | |
| 1225 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
| 1226 | local recip = 0.5 / s | |
| 1227 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
| 1228 | elseif i == 2 then | |
| 1229 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
| 1230 | local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
| 1231 | end | |
| 1232 | end | |
| 1233 | end | |
| 1234 | ||
| 1235 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
| 1236 | local xs, ys, zs = x + x, y + y, z + z | |
| 1237 | local wx, wy, wz = w * xs, w * ys, w * zs | |
| 1238 | local xx = x * xs | |
| 1239 | local xy = x * ys | |
| 1240 | local xz = x * zs | |
| 1241 | local yy = y * ys | |
| 1242 | local yz = y * zs | |
| 1243 | local zz = z * zs | |
| 1244 | 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)) | |
| 1245 | end | |
| 1246 | ||
| 1247 | function QuaternionSlerp(a, b, t) | |
| 1248 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
| 1249 | local startInterp, finishInterp; | |
| 1250 | if cosTheta >= 0.0001 then | |
| 1251 | if (1 - cosTheta) > 0.0001 then | |
| 1252 | local theta = ACOS(cosTheta) | |
| 1253 | local invSinTheta = 1 / SIN(theta) | |
| 1254 | startInterp = SIN((1 - t) * theta) * invSinTheta | |
| 1255 | finishInterp = SIN(t * theta) * invSinTheta | |
| 1256 | else | |
| 1257 | startInterp = 1 - t | |
| 1258 | finishInterp = t | |
| 1259 | end | |
| 1260 | else | |
| 1261 | if (1 + cosTheta) > 0.0001 then | |
| 1262 | local theta = ACOS(-cosTheta) | |
| 1263 | local invSinTheta = 1 / SIN(theta) | |
| 1264 | startInterp = SIN((t - 1) * theta) * invSinTheta | |
| 1265 | finishInterp = SIN(t * theta) * invSinTheta | |
| 1266 | else | |
| 1267 | startInterp = t - 1 | |
| 1268 | finishInterp = t | |
| 1269 | end | |
| 1270 | end | |
| 1271 | 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 | |
| 1272 | end | |
| 1273 | ||
| 1274 | function Clerp(a, b, t) | |
| 1275 | local qa = {QuaternionFromCFrame(a)}
| |
| 1276 | local qb = {QuaternionFromCFrame(b)}
| |
| 1277 | local ax, ay, az = a.x, a.y, a.z | |
| 1278 | local bx, by, bz = b.x, b.y, b.z | |
| 1279 | local _t = 1 - t | |
| 1280 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
| 1281 | end | |
| 1282 | ||
| 1283 | function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME) | |
| 1284 | local frame = IT("Frame")
| |
| 1285 | frame.BackgroundTransparency = TRANSPARENCY | |
| 1286 | frame.BorderSizePixel = BORDERSIZEPIXEL | |
| 1287 | frame.Position = POSITION | |
| 1288 | frame.Size = SIZE | |
| 1289 | frame.BackgroundColor3 = COLOR | |
| 1290 | frame.BorderColor3 = BORDERCOLOR | |
| 1291 | frame.Name = NAME | |
| 1292 | frame.Parent = PARENT | |
| 1293 | return frame | |
| 1294 | end | |
| 1295 | ||
| 1296 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
| 1297 | local label = IT("TextLabel")
| |
| 1298 | label.BackgroundTransparency = 1 | |
| 1299 | label.Size = UD2(1, 0, 1, 0) | |
| 1300 | label.Position = UD2(0, 0, 0, 0) | |
| 1301 | label.TextColor3 = TEXTCOLOR | |
| 1302 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
| 1303 | label.TextTransparency = TRANSPARENCY | |
| 1304 | label.FontSize = TEXTFONTSIZE | |
| 1305 | label.Font = TEXTFONT | |
| 1306 | label.BorderSizePixel = BORDERSIZEPIXEL | |
| 1307 | label.TextScaled = false | |
| 1308 | label.Text = TEXT | |
| 1309 | label.Name = NAME | |
| 1310 | label.Parent = PARENT | |
| 1311 | return label | |
| 1312 | end | |
| 1313 | ||
| 1314 | function NoOutlines(PART) | |
| 1315 | PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10 | |
| 1316 | end | |
| 1317 | ||
| 1318 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
| 1319 | local NEWWELD = IT(TYPE) | |
| 1320 | NEWWELD.Part0 = PART0 | |
| 1321 | NEWWELD.Part1 = PART1 | |
| 1322 | NEWWELD.C0 = C0 | |
| 1323 | NEWWELD.C1 = C1 | |
| 1324 | NEWWELD.Parent = PARENT | |
| 1325 | return NEWWELD | |
| 1326 | end | |
| 1327 | ||
| 1328 | local S = IT("Sound")
| |
| 1329 | function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP) | |
| 1330 | local NEWSOUND = nil | |
| 1331 | coroutine.resume(coroutine.create(function() | |
| 1332 | NEWSOUND = S:Clone() | |
| 1333 | NEWSOUND.Parent = PARENT | |
| 1334 | NEWSOUND.Volume = VOLUME | |
| 1335 | NEWSOUND.Pitch = PITCH | |
| 1336 | NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID | |
| 1337 | NEWSOUND:play() | |
| 1338 | if DOESLOOP == true then | |
| 1339 | NEWSOUND.Looped = true | |
| 1340 | else | |
| 1341 | repeat wait(1) until NEWSOUND.Playing == false | |
| 1342 | NEWSOUND:remove() | |
| 1343 | end | |
| 1344 | end)) | |
| 1345 | return NEWSOUND | |
| 1346 | end | |
| 1347 | ||
| 1348 | function CFrameFromTopBack(at, top, back) | |
| 1349 | local right = top:Cross(back) | |
| 1350 | 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) | |
| 1351 | end | |
| 1352 | ||
| 1353 | --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
| |
| 1354 | function WACKYEFFECT(Table) | |
| 1355 | local TYPE = (Table.EffectType or "Sphere") | |
| 1356 | local SIZE = (Table.Size or VT(1,1,1)) | |
| 1357 | local ENDSIZE = (Table.Size2 or VT(0,0,0)) | |
| 1358 | local TRANSPARENCY = (Table.Transparency or 0) | |
| 1359 | local ENDTRANSPARENCY = (Table.Transparency2 or 1) | |
| 1360 | local CFRAME = (Table.CFrame or Torso.CFrame) | |
| 1361 | local MOVEDIRECTION = (Table.MoveToPos or nil) | |
| 1362 | local ROTATION1 = (Table.RotationX or 0) | |
| 1363 | local ROTATION2 = (Table.RotationY or 0) | |
| 1364 | local ROTATION3 = (Table.RotationZ or 0) | |
| 1365 | local MATERIAL = (Table.Material or "Neon") | |
| 1366 | local COLOR = (Table.Color or C3(1,1,1)) | |
| 1367 | local TIME = (Table.Time or 45) | |
| 1368 | local SOUNDID = (Table.SoundID or nil) | |
| 1369 | local SOUNDPITCH = (Table.SoundPitch or nil) | |
| 1370 | local SOUNDVOLUME = (Table.SoundVolume or nil) | |
| 1371 | coroutine.resume(coroutine.create(function() | |
| 1372 | local PLAYSSOUND = false | |
| 1373 | local SOUND = nil | |
| 1374 | local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
| |
| 1375 | if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then | |
| 1376 | PLAYSSOUND = true | |
| 1377 | SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false) | |
| 1378 | end | |
| 1379 | EFFECT.Color = COLOR | |
| 1380 | local MSH = nil | |
| 1381 | if TYPE == "Sphere" then | |
| 1382 | MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
| |
| 1383 | elseif TYPE == "Block" then | |
| 1384 | MSH = IT("BlockMesh",EFFECT)
| |
| 1385 | MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X) | |
| 1386 | elseif TYPE == "Wave" then | |
| 1387 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
| |
| 1388 | elseif TYPE == "Ring" then | |
| 1389 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
| |
| 1390 | elseif TYPE == "Slash" then | |
| 1391 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
| |
| 1392 | elseif TYPE == "Round Slash" then | |
| 1393 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
| |
| 1394 | elseif TYPE == "Swirl" then | |
| 1395 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
| |
| 1396 | elseif TYPE == "Skull" then | |
| 1397 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
| |
| 1398 | elseif TYPE == "Crystal" then | |
| 1399 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
| |
| 1400 | end | |
| 1401 | if MSH ~= nil then | |
| 1402 | local MOVESPEED = nil | |
| 1403 | if MOVEDIRECTION ~= nil then | |
| 1404 | MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME | |
| 1405 | end | |
| 1406 | local GROWTH = SIZE - ENDSIZE | |
| 1407 | local TRANS = TRANSPARENCY - ENDTRANSPARENCY | |
| 1408 | if TYPE == "Block" then | |
| 1409 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
| 1410 | else | |
| 1411 | EFFECT.CFrame = CFRAME | |
| 1412 | end | |
| 1413 | for LOOP = 1, TIME+1 do | |
| 1414 | Swait() | |
| 1415 | MSH.Scale = MSH.Scale - GROWTH/TIME | |
| 1416 | if TYPE == "Wave" then | |
| 1417 | MSH.Offset = VT(0,0,-MSH.Scale.X/8) | |
| 1418 | end | |
| 1419 | EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME | |
| 1420 | if TYPE == "Block" then | |
| 1421 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
| 1422 | else | |
| 1423 | EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3)) | |
| 1424 | end | |
| 1425 | if MOVEDIRECTION ~= nil then | |
| 1426 | local ORI = EFFECT.Orientation | |
| 1427 | EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED) | |
| 1428 | EFFECT.Orientation = ORI | |
| 1429 | end | |
| 1430 | end | |
| 1431 | if PLAYSSOUND == false then | |
| 1432 | EFFECT:remove() | |
| 1433 | else | |
| 1434 | repeat Swait() until SOUND.Playing == false | |
| 1435 | EFFECT:remove() | |
| 1436 | end | |
| 1437 | else | |
| 1438 | if PLAYSSOUND == false then | |
| 1439 | EFFECT:remove() | |
| 1440 | else | |
| 1441 | repeat Swait() until SOUND.Playing == false | |
| 1442 | EFFECT:remove() | |
| 1443 | end | |
| 1444 | end | |
| 1445 | end)) | |
| 1446 | end | |
| 1447 | ||
| 1448 | function MakeForm(PART,TYPE) | |
| 1449 | if TYPE == "Cyl" then | |
| 1450 | local MSH = IT("CylinderMesh",PART)
| |
| 1451 | elseif TYPE == "Ball" then | |
| 1452 | local MSH = IT("SpecialMesh",PART)
| |
| 1453 | MSH.MeshType = "Sphere" | |
| 1454 | elseif TYPE == "Wedge" then | |
| 1455 | local MSH = IT("SpecialMesh",PART)
| |
| 1456 | MSH.MeshType = "Wedge" | |
| 1457 | end | |
| 1458 | end | |
| 1459 | ||
| 1460 | Debris = game:GetService("Debris")
| |
| 1461 | ||
| 1462 | function CastProperRay(StartPos, EndPos, Distance, Ignore) | |
| 1463 | local DIRECTION = CF(StartPos,EndPos).lookVector | |
| 1464 | return Raycast(StartPos, DIRECTION, Distance, Ignore) | |
| 1465 | end | |
| 1466 | ||
| 1467 | function turnto(position) | |
| 1468 | RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0) | |
| 1469 | end | |
| 1470 | ||
| 1471 | --//=================================\\ | |
| 1472 | --|| WEAPON CREATION | |
| 1473 | --\\=================================// | |
| 1474 | local BODY = {}
| |
| 1475 | ||
| 1476 | for _, c in pairs(Character:GetDescendants()) do | |
| 1477 | if c:IsA("BasePart") and c.Name ~= "Handle" then
| |
| 1478 | if c ~= RootPart and c ~= Torso and c ~= Head and c ~= RightArm and c ~= LeftArm and c ~= RightLeg and c ~= LeftLeg then | |
| 1479 | c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0) | |
| 1480 | end | |
| 1481 | table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency})
| |
| 1482 | elseif c:IsA("JointInstance") then
| |
| 1483 | table.insert(BODY,{c,c.Parent,nil,nil,nil})
| |
| 1484 | end | |
| 1485 | end | |
| 1486 | ||
| 1487 | for e = 1, #BODY do | |
| 1488 | if BODY[e] ~= nil then | |
| 1489 | local STUFF = BODY[e] | |
| 1490 | local PART = STUFF[1] | |
| 1491 | local PARENT = STUFF[2] | |
| 1492 | local MATERIAL = STUFF[3] | |
| 1493 | local COLOR = STUFF[4] | |
| 1494 | local TRANSPARENCY = STUFF[5] | |
| 1495 | if PART.ClassName == "Part" and PART ~= RootPart then | |
| 1496 | PART.Material = MATERIAL | |
| 1497 | PART.Color = COLOR | |
| 1498 | PART.Transparency = TRANSPARENCY | |
| 1499 | end | |
| 1500 | PART.AncestryChanged:Connect(function() | |
| 1501 | PART.Parent = PARENT | |
| 1502 | end) | |
| 1503 | end | |
| 1504 | end | |
| 1505 | ||
| 1506 | ------------------------------------------------------- | |
| 1507 | local Orbd = Instance.new("Part", Character)
| |
| 1508 | Orbd.Name = "Orbd" | |
| 1509 | Orbd.Shape = Enum.PartType.Ball | |
| 1510 | Orbd.CanCollide = false | |
| 1511 | Orbd.BrickColor = BrickColor.new("Really black")
| |
| 1512 | Orbd.Transparency = 0 | |
| 1513 | Orbd.Material = "Neon" | |
| 1514 | Orbd.Size = Vector3.new(0.3, 0.3, 0.3) | |
| 1515 | Orbd.TopSurface = Enum.SurfaceType.Smooth | |
| 1516 | Orbd.BottomSurface = Enum.SurfaceType.Smooth | |
| 1517 | ||
| 1518 | local Weld = Instance.new("Weld", Orbd)
| |
| 1519 | Weld.Part0 = Character.Head | |
| 1520 | Weld.Part1 = Orbd | |
| 1521 | Weld.C1 = CFrame.new(-0.26, -0.24, 0.55) | |
| 1522 | ||
| 1523 | -------------------------------------------------------- | |
| 1524 | local Orbvc = Instance.new("Part", Character)
| |
| 1525 | Orbvc.Name = "Orbvc" | |
| 1526 | Orbvc.Shape = Enum.PartType.Ball | |
| 1527 | Orbvc.CanCollide = false | |
| 1528 | Orbvc.BrickColor = BrickColor.new("Really black")
| |
| 1529 | Orbvc.Transparency = 0 | |
| 1530 | Orbvc.Material = "Neon" | |
| 1531 | Orbvc.Size = Vector3.new(0.3, 0.3, 0.3) | |
| 1532 | Orbvc.TopSurface = Enum.SurfaceType.Smooth | |
| 1533 | Orbvc.BottomSurface = Enum.SurfaceType.Smooth | |
| 1534 | ||
| 1535 | local Weld = Instance.new("Weld", Orbvc)
| |
| 1536 | Weld.Part0 = Character.Head | |
| 1537 | Weld.Part1 = Orbvc | |
| 1538 | Weld.C1 = CFrame.new(0.26, -0.24, 0.55) | |
| 1539 | --------------------------------------------------------- | |
| 1540 | local Mask = Instance.new("Part", Character)
| |
| 1541 | Mask.Name = "Mask" | |
| 1542 | Mask.CanCollide = false | |
| 1543 | Mask.BrickColor = BrickColor.new("Medium stone grey")
| |
| 1544 | Mask.Transparency = 0 | |
| 1545 | Mask.Material = "Neon" | |
| 1546 | Mask.Size = Vector3.new(0.1, 0.1, 0.1) | |
| 1547 | Mask.TopSurface = Enum.SurfaceType.Smooth | |
| 1548 | Mask.BottomSurface = Enum.SurfaceType.Smooth | |
| 1549 | ||
| 1550 | local Weld = Instance.new("Weld", Mask)
| |
| 1551 | Weld.Part0 = Character.Head | |
| 1552 | Weld.Part1 = Mask | |
| 1553 | Weld.C1 = CFrame.new(0, -0.1, 0.8) | |
| 1554 | ||
| 1555 | local M1 = Instance.new("SpecialMesh")
| |
| 1556 | M1.Parent = Mask | |
| 1557 | M1.MeshId = "http://www.roblox.com/asset/?id=62679079" | |
| 1558 | M1.Scale = Vector3.new( 1, 1, 2) | |
| 1559 | ---------------------------------------------------------- | |
| 1560 | local Hood = Instance.new("Part", Character)
| |
| 1561 | Hood.Name = "Hood" | |
| 1562 | Hood.CanCollide = false | |
| 1563 | Hood.BrickColor = BrickColor.new("Really black")
| |
| 1564 | Hood.Transparency = 0 | |
| 1565 | Hood.Material = "Plastic" | |
| 1566 | Hood.Size = Vector3.new(0.1, 0.1, 0.1) | |
| 1567 | Hood.TopSurface = Enum.SurfaceType.Smooth | |
| 1568 | Hood.BottomSurface = Enum.SurfaceType.Smooth | |
| 1569 | ||
| 1570 | local Weld = Instance.new("Weld", Hood)
| |
| 1571 | Weld.Part0 = Character.Head | |
| 1572 | Weld.Part1 = Hood | |
| 1573 | Weld.C1 = CFrame.new(0, -0.2, 0) | |
| 1574 | ||
| 1575 | local M2 = Instance.new("SpecialMesh")
| |
| 1576 | M2.Parent = Hood | |
| 1577 | M2.MeshId = "http://www.roblox.com/asset/?id=83499032" | |
| 1578 | M2.Scale = Vector3.new( 1, 1.2, 1.1) | |
| 1579 | ------------------------------------------------------ | |
| 1580 | --[[ | |
| 1581 | Thanks for using Build-To-Lua by jarredbcv. | |
| 1582 | ]]-- | |
| 1583 | ||
| 1584 | New = function(Object, Parent, Name, Data) | |
| 1585 | local Object = Instance.new(Object) | |
| 1586 | for Index, Value in pairs(Data or {}) do
| |
| 1587 | Object[Index] = Value | |
| 1588 | end | |
| 1589 | Object.Parent = Parent | |
| 1590 | Object.Name = Name | |
| 1591 | return Object | |
| 1592 | end | |
| 1593 | ||
| 1594 | for i = 1, 35 do | |
| 1595 | local FACE = CreatePart(3, Character, "Fabric", 0, 0+(i-1)/35.2, "Dark stone grey", "FaceGradient", VT(1.01,0.5,1.01),false) | |
| 1596 | FACE.Color = C3(0,0,0) | |
| 1597 | Head:FindFirstChildOfClass("SpecialMesh"):Clone().Parent = FACE
| |
| 1598 | CreateWeldOrSnapOrMotor("Weld", Head, Head, FACE, CF(0,0.35-(i-1)/75,0), CF(0, 0, 0))
| |
| 1599 | end | |
| 1600 | ||
| 1601 | local Eye = CreatePart(3, Character, "Neon", 0, 0, "Really red", "Eye", VT(0.6,0.1,1)/2,false) | |
| 1602 | MakeForm(Eye,"Ball") | |
| 1603 | CreateWeldOrSnapOrMotor("Weld", Eye, Head, Eye, CF(0,0.2,0) * ANGLES(RAD(0), RAD(-18), RAD(15)), CF(0, 0, 0.4))
| |
| 1604 | local Eye = CreatePart(3, Character, "Neon", 0, 0, "Black", "Eye", VT(0.6,0.1,1)/2,false) | |
| 1605 | MakeForm(Eye,"Ball") | |
| 1606 | CreateWeldOrSnapOrMotor("Weld", Eye, Head, Eye, CF(0,0.2,0) * ANGLES(RAD(0), RAD(18), RAD(-15)), CF(0, 0, 0.4))
| |
| 1607 | local Eye = CreatePart(3, Character, "Neon", 0, 0, "Black", "Eye", VT(0.1,1,1)/2,false) | |
| 1608 | MakeForm(Eye,"Ball") | |
| 1609 | CreateWeldOrSnapOrMotor("Weld", Eye, Head, Eye, CF(0,0.15,0) * ANGLES(RAD(0), RAD(-18), RAD(0)), CF(0, 0, 0.4))
| |
| 1610 | local Eye = CreatePart(3, Character, "Neon", 0, 0, "Black", "Eye", VT(0.1,1,1)/2,false) | |
| 1611 | MakeForm(Eye,"Ball") | |
| 1612 | CreateWeldOrSnapOrMotor("Weld", Eye, Head, Eye, CF(0,0.15,0) * ANGLES(RAD(0), RAD(18), RAD(0)), CF(0, 0, 0.4))
| |
| 1613 | ||
| 1614 | local BasePart = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Black", "BraceletPart", VT(1.01,0.3,1.01),false) | |
| 1615 | CreateWeldOrSnapOrMotor("Weld", RightArm, RightArm, BasePart, CF(0, -0.2, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
| |
| 1616 | for i = 1, 3 do | |
| 1617 | local Part = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Black", "BraceletPart", VT(0.2,1.02,0.2),false) | |
| 1618 | CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Part, CF(0, 0, 0.6-0.3*i) * ANGLES(RAD(0), RAD(0), RAD(90)), CF(0, 0, 0))
| |
| 1619 | MakeForm(Part,"Cyl") | |
| 1620 | end | |
| 1621 | for i = 1, 3 do | |
| 1622 | local Part = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Black", "BraceletPart", VT(0.2,1.02,0.2),false) | |
| 1623 | CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Part, CF(0.6-0.3*i, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(90)), CF(0, 0, 0))
| |
| 1624 | MakeForm(Part,"Cyl") | |
| 1625 | end | |
| 1626 | local Part = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Black", "BraceletPart", VT(0.51,0.6,0.25),false) | |
| 1627 | CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Part, CF(-0.125, -0.4, -0.25) * ANGLES(RAD(0), RAD(90), RAD(180)), CF(0, 0, 0))
| |
| 1628 | MakeForm(Part,"Wedge") | |
| 1629 | local Part = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Black", "BraceletPart", VT(0.51,0.6,0.25),false) | |
| 1630 | CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Part, CF(0.125, -0.4, -0.25) * ANGLES(RAD(0), RAD(-90), RAD(180)), CF(0, 0, 0))
| |
| 1631 | MakeForm(Part,"Wedge") | |
| 1632 | local Part = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Black", "BraceletPart", VT(0.52,0.5,0.25/2.3),false) | |
| 1633 | CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Part, CF(-0.125/2.3, -0.25, -0.25) * ANGLES(RAD(0), RAD(90), RAD(180)), CF(0, 0, 0))
| |
| 1634 | MakeForm(Part,"Wedge") | |
| 1635 | local Part = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Black", "BraceletPart", VT(0.52,0.5,0.25/2.3),false) | |
| 1636 | CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Part, CF(0.125/2.3, -0.25, -0.25) * ANGLES(RAD(0), RAD(-90), RAD(180)), CF(0, 0, 0))
| |
| 1637 | MakeForm(Part,"Wedge") | |
| 1638 | ||
| 1639 | ||
| 1640 | ||
| 1641 | ||
| 1642 | ||
| 1643 | ||
| 1644 | ||
| 1645 | for _, c in pairs(Weapon:GetChildren()) do | |
| 1646 | if c.ClassName == "Part" then | |
| 1647 | c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0) | |
| 1648 | local AURA = c:Clone() | |
| 1649 | AURA:BreakJoints() | |
| 1650 | AURA.Parent = c | |
| 1651 | AURA.CFrame = c.CFrame | |
| 1652 | AURA.Size = AURA.Size*1.001 | |
| 1653 | AURA.Transparency = 0.8 | |
| 1654 | AURA.BrickColor = BRICKC"Royal purple" | |
| 1655 | AURA.Material = "Neon" | |
| 1656 | weldBetween(c,AURA) | |
| 1657 | end | |
| 1658 | end | |
| 1659 | function refit() | |
| 1660 | Character.Parent = workspace | |
| 1661 | for e = 1, #BODY do | |
| 1662 | if BODY[e] ~= nil then | |
| 1663 | local STUFF = BODY[e] | |
| 1664 | local PART = STUFF[1] | |
| 1665 | local PARENT = STUFF[2] | |
| 1666 | local MATERIAL = STUFF[3] | |
| 1667 | local COLOR = STUFF[4] | |
| 1668 | local TRANSPARENCY = STUFF[5] | |
| 1669 | if PART.ClassName == "Part" and PART ~= RootPart then | |
| 1670 | PART.Material = MATERIAL | |
| 1671 | PART.Color = COLOR | |
| 1672 | PART.Transparency = TRANSPARENCY | |
| 1673 | end | |
| 1674 | if PART.Parent ~= PARENT then | |
| 1675 | Humanoid:remove() | |
| 1676 | PART.Parent = PARENT | |
| 1677 | Humanoid = IT("Humanoid",Character)
| |
| 1678 | end | |
| 1679 | end | |
| 1680 | end | |
| 1681 | end | |
| 1682 | ||
| 1683 | local SKILLTEXTCOLOR = BRICKC"Black".Color | |
| 1684 | local SKILLFONT = "Bodoni" | |
| 1685 | local SKILLTEXTSIZE = 7 | |
| 1686 | ||
| 1687 | Weapon.Parent = Character | |
| 1688 | ||
| 1689 | Humanoid.Died:connect(function() | |
| 1690 | ||
| 1691 | ATTACK = true | |
| 1692 | end) | |
| 1693 | ||
| 1694 | local SKILL1FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.23-.20, 0, 0.84, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame") | |
| 1695 | local SKILL2FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.50+.20, 0, 0.84, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame") | |
| 1696 | local SKILL3FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.23, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame") | |
| 1697 | local SKILL4FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.50, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame") | |
| 1698 | local SKILL5FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.365, 0, 0.86, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 5 Frame") | |
| 1699 | local SKILL6FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.365, 0, 0.76, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 6 Frame") | |
| 1700 | ||
| 1701 | ||
| 1702 | local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] BEAM OF CORRUPTION", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 0, 0, "Text 1") | |
| 1703 | local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[X] EXPLOSION", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 0, 0, "Text 2") | |
| 1704 | local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] STUN", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 0, 0, "Text 3") | |
| 1705 | local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[E] SCREAM", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 0, 0, "Text 4") | |
| 1706 | local SKILL5TEXT = CreateLabel(SKILL5FRAME, "[R] WARP", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 0, 0, "Text 5") | |
| 1707 | local SKILL6TEXT = CreateLabel(SKILL6FRAME, "[Q] PAIN", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 0, 0, "Text 6") | |
| 1708 | ||
| 1709 | --//=================================\\ | |
| 1710 | --|| RAGDOLL STUFF | |
| 1711 | --\\=================================// | |
| 1712 | ||
| 1713 | function recurse(root,callback,i) | |
| 1714 | i= i or 0 | |
| 1715 | for _,v in pairs(root:GetChildren()) do | |
| 1716 | i = i + 1 | |
| 1717 | callback(i,v) | |
| 1718 | ||
| 1719 | if #v:GetChildren() > 0 then | |
| 1720 | i = recurse(v,callback,i) | |
| 1721 | end | |
| 1722 | end | |
| 1723 | ||
| 1724 | return i | |
| 1725 | end | |
| 1726 | ||
| 1727 | function ragdollJoint(character, part0, part1, attachmentName, className, properties) | |
| 1728 | attachmentName = attachmentName.."RigAttachment" | |
| 1729 | local constraint = Instance.new(className.."Constraint") | |
| 1730 | constraint.Attachment0 = part0:FindFirstChild(attachmentName) | |
| 1731 | constraint.Attachment1 = part1:FindFirstChild(attachmentName) | |
| 1732 | constraint.Name = "RagdollConstraint"..part1.Name | |
| 1733 | ||
| 1734 | for _,propertyData in next,properties or {} do
| |
| 1735 | constraint[propertyData[1]] = propertyData[2] | |
| 1736 | end | |
| 1737 | ||
| 1738 | constraint.Parent = character | |
| 1739 | end | |
| 1740 | ||
| 1741 | function getAttachment0(character, attachmentName) | |
| 1742 | for _,child in next,character:GetChildren() do | |
| 1743 | local attachment = child:FindFirstChild(attachmentName) | |
| 1744 | if attachment then | |
| 1745 | return attachment | |
| 1746 | end | |
| 1747 | end | |
| 1748 | end | |
| 1749 | ||
| 1750 | function ArtificialHitbox(Part) | |
| 1751 | local HITBOX = CreatePart(3, Part, "Metal", 0, 1, "Really black", "Hitbox", Part.Size/2, false) | |
| 1752 | HITBOX.CanCollide = true | |
| 1753 | HITBOX.CFrame = Part.CFrame | |
| 1754 | weldBetween(Part,HITBOX) | |
| 1755 | end | |
| 1756 | ||
| 1757 | function R15Ragdoll(character,KeepArms) | |
| 1758 | character:BreakJoints() | |
| 1759 | coroutine.resume(coroutine.create(function() | |
| 1760 | recurse(character, function(_,v) | |
| 1761 | if v:IsA("Attachment") then
| |
| 1762 | v.Axis = Vector3.new(0, 1, 0) | |
| 1763 | v.SecondaryAxis = Vector3.new(0, 0, 1) | |
| 1764 | v.Rotation = Vector3.new(0, 0, 0) | |
| 1765 | end | |
| 1766 | end) | |
| 1767 | for _,child in next,character:GetChildren() do | |
| 1768 | if child:IsA("Accoutrement") then
| |
| 1769 | for _,part in next,child:GetChildren() do | |
| 1770 | if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
| |
| 1771 | local attachment1 = part:FindFirstChildOfClass("Attachment")
| |
| 1772 | local attachment0 = getAttachment0(character,attachment1.Name) | |
| 1773 | if attachment0 and attachment1 then | |
| 1774 | local constraint = Instance.new("HingeConstraint")
| |
| 1775 | constraint.Attachment0 = attachment0 | |
| 1776 | constraint.Attachment1 = attachment1 | |
| 1777 | constraint.LimitsEnabled = true | |
| 1778 | constraint.UpperAngle = 0 | |
| 1779 | constraint.LowerAngle = 0 | |
| 1780 | constraint.Parent = character | |
| 1781 | end | |
| 1782 | ArtificialHitbox(part) | |
| 1783 | elseif part.Name == "HumanoidRootPart" then | |
| 1784 | part:remove() | |
| 1785 | end | |
| 1786 | end | |
| 1787 | end | |
| 1788 | end | |
| 1789 | ||
| 1790 | ragdollJoint(character,character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", {
| |
| 1791 | {"LimitsEnabled",true};
| |
| 1792 | {"UpperAngle",5};
| |
| 1793 | }) | |
| 1794 | if character:FindFirstChild("Head") then
| |
| 1795 | ragdollJoint(character,character.UpperTorso, character.Head, "Neck", "BallSocket", {
| |
| 1796 | {"LimitsEnabled",true};
| |
| 1797 | {"UpperAngle",15};
| |
| 1798 | }) | |
| 1799 | end | |
| 1800 | ||
| 1801 | local handProperties = {
| |
| 1802 | {"LimitsEnabled", true};
| |
| 1803 | {"UpperAngle",0};
| |
| 1804 | {"LowerAngle",0};
| |
| 1805 | } | |
| 1806 | ragdollJoint(character,character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties) | |
| 1807 | ragdollJoint(character,character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties) | |
| 1808 | ||
| 1809 | local shinProperties = {
| |
| 1810 | {"LimitsEnabled", true};
| |
| 1811 | {"UpperAngle", 0};
| |
| 1812 | {"LowerAngle", -75};
| |
| 1813 | } | |
| 1814 | ragdollJoint(character,character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties) | |
| 1815 | ragdollJoint(character,character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties) | |
| 1816 | ||
| 1817 | local footProperties = {
| |
| 1818 | {"LimitsEnabled", true};
| |
| 1819 | {"UpperAngle", 15};
| |
| 1820 | {"LowerAngle", -45};
| |
| 1821 | } | |
| 1822 | ragdollJoint(character,character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties) | |
| 1823 | ragdollJoint(character,character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties) | |
| 1824 | if KeepArms == true then | |
| 1825 | ragdollJoint(character,character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket") | |
| 1826 | ragdollJoint(character,character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket") | |
| 1827 | ragdollJoint(character,character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket") | |
| 1828 | ragdollJoint(character,character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket") | |
| 1829 | end | |
| 1830 | ragdollJoint(character,character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket") | |
| 1831 | ragdollJoint(character,character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket") | |
| 1832 | Debris:AddItem(character,5) | |
| 1833 | end)) | |
| 1834 | end | |
| 1835 | ||
| 1836 | function Ragdoll(Character2,CharTorso,KeepArms) | |
| 1837 | coroutine.resume(coroutine.create(function() | |
| 1838 | Character2:BreakJoints() | |
| 1839 | local hum = Character2:findFirstChild("Humanoid")
| |
| 1840 | hum:remove() | |
| 1841 | local function Scan(ch) | |
| 1842 | local e | |
| 1843 | for e = 1,#ch do | |
| 1844 | Scan(ch[e]:GetChildren()) | |
| 1845 | if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then | |
| 1846 | ch[e]:remove() | |
| 1847 | end | |
| 1848 | end | |
| 1849 | end | |
| 1850 | local NEWHUM = IT("Humanoid")
| |
| 1851 | NEWHUM.Name = "Corpse" | |
| 1852 | NEWHUM.Health = 0 | |
| 1853 | NEWHUM.MaxHealth = 0 | |
| 1854 | NEWHUM.PlatformStand = true | |
| 1855 | NEWHUM.Parent = Character2 | |
| 1856 | NEWHUM.DisplayDistanceType = "None" | |
| 1857 | ||
| 1858 | local ch = Character2:GetChildren() | |
| 1859 | local i | |
| 1860 | for i = 1,#ch do | |
| 1861 | if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then | |
| 1862 | ch[i]:remove() | |
| 1863 | end | |
| 1864 | end | |
| 1865 | ||
| 1866 | local Torso2 = Character2.Torso | |
| 1867 | local movevector = Vector3.new() | |
| 1868 | ||
| 1869 | if Torso2 then | |
| 1870 | movevector = CFrame.new(CharTorso.Position,Torso2.Position).lookVector | |
| 1871 | local Head = Character2:FindFirstChild("Head")
| |
| 1872 | if Head then | |
| 1873 | local Neck = Instance.new("Weld")
| |
| 1874 | Neck.Name = "Neck" | |
| 1875 | Neck.Part0 = Torso2 | |
| 1876 | Neck.Part1 = Head | |
| 1877 | Neck.C0 = CFrame.new(0, 1.5, 0) | |
| 1878 | Neck.C1 = CFrame.new() | |
| 1879 | Neck.Parent = Torso2 | |
| 1880 | ||
| 1881 | end | |
| 1882 | local Limb = Character2:FindFirstChild("Right Arm")
| |
| 1883 | if Limb and KeepArms == true then | |
| 1884 | ||
| 1885 | Limb.CFrame = Torso2.CFrame * CFrame.new(1.5, 0, 0) | |
| 1886 | local Joint = Instance.new("Glue")
| |
| 1887 | Joint.Name = "RightShoulder" | |
| 1888 | Joint.Part0 = Torso2 | |
| 1889 | Joint.Part1 = Limb | |
| 1890 | Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 1891 | Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 1892 | Joint.Parent = Torso2 | |
| 1893 | ||
| 1894 | local B = Instance.new("Part")
| |
| 1895 | B.TopSurface = 0 | |
| 1896 | B.BottomSurface = 0 | |
| 1897 | B.formFactor = "Symmetric" | |
| 1898 | B.Size = Vector3.new(1, 1, 1) | |
| 1899 | B.Transparency = 1 | |
| 1900 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
| 1901 | B.Parent = Character2 | |
| 1902 | local W = Instance.new("Weld")
| |
| 1903 | W.Part0 = Limb | |
| 1904 | W.Part1 = B | |
| 1905 | W.C0 = CFrame.new(0, -0.5, 0) | |
| 1906 | W.Parent = Limb | |
| 1907 | ||
| 1908 | end | |
| 1909 | local Limb = Character2:FindFirstChild("Left Arm")
| |
| 1910 | if Limb and KeepArms == true then | |
| 1911 | ||
| 1912 | Limb.CFrame = Torso2.CFrame * CFrame.new(-1.5, 0, 0) | |
| 1913 | local Joint = Instance.new("Glue")
| |
| 1914 | Joint.Name = "LeftShoulder" | |
| 1915 | Joint.Part0 = Torso2 | |
| 1916 | Joint.Part1 = Limb | |
| 1917 | Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 1918 | Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 1919 | Joint.Parent = Torso2 | |
| 1920 | ||
| 1921 | local B = Instance.new("Part")
| |
| 1922 | B.TopSurface = 0 | |
| 1923 | B.BottomSurface = 0 | |
| 1924 | B.formFactor = "Symmetric" | |
| 1925 | B.Size = Vector3.new(1, 1, 1) | |
| 1926 | B.Transparency = 1 | |
| 1927 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
| 1928 | B.Parent = Character2 | |
| 1929 | local W = Instance.new("Weld")
| |
| 1930 | W.Part0 = Limb | |
| 1931 | W.Part1 = B | |
| 1932 | W.C0 = CFrame.new(0, -0.5, 0) | |
| 1933 | W.Parent = Limb | |
| 1934 | ||
| 1935 | end | |
| 1936 | local Limb = Character2:FindFirstChild("Right Leg")
| |
| 1937 | if Limb then | |
| 1938 | ||
| 1939 | Limb.CFrame = Torso2.CFrame * CFrame.new(0.5, -2, 0) | |
| 1940 | local Joint = Instance.new("Glue")
| |
| 1941 | Joint.Name = "RightHip" | |
| 1942 | Joint.Part0 = Torso2 | |
| 1943 | Joint.Part1 = Limb | |
| 1944 | Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 1945 | Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 1946 | Joint.Parent = Torso2 | |
| 1947 | ||
| 1948 | local B = Instance.new("Part")
| |
| 1949 | B.TopSurface = 0 | |
| 1950 | B.BottomSurface = 0 | |
| 1951 | B.formFactor = "Symmetric" | |
| 1952 | B.Size = Vector3.new(1, 1, 1) | |
| 1953 | B.Transparency = 1 | |
| 1954 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
| 1955 | B.Parent = Character2 | |
| 1956 | local W = Instance.new("Weld")
| |
| 1957 | W.Part0 = Limb | |
| 1958 | W.Part1 = B | |
| 1959 | W.C0 = CFrame.new(0, -0.5, 0) | |
| 1960 | W.Parent = Limb | |
| 1961 | ||
| 1962 | end | |
| 1963 | local Limb = Character2:FindFirstChild("Left Leg")
| |
| 1964 | if Limb then | |
| 1965 | ||
| 1966 | Limb.CFrame = Torso2.CFrame * CFrame.new(-0.5, -2, 0) | |
| 1967 | local Joint = Instance.new("Glue")
| |
| 1968 | Joint.Name = "LeftHip" | |
| 1969 | Joint.Part0 = Torso2 | |
| 1970 | Joint.Part1 = Limb | |
| 1971 | Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 1972 | Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 1973 | Joint.Parent = Torso2 | |
| 1974 | ||
| 1975 | local B = Instance.new("Part")
| |
| 1976 | B.TopSurface = 0 | |
| 1977 | B.BottomSurface = 0 | |
| 1978 | B.formFactor = "Symmetric" | |
| 1979 | B.Size = Vector3.new(1, 1, 1) | |
| 1980 | B.Transparency = 1 | |
| 1981 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
| 1982 | B.Parent = Character2 | |
| 1983 | local W = Instance.new("Weld")
| |
| 1984 | W.Part0 = Limb | |
| 1985 | W.Part1 = B | |
| 1986 | W.C0 = CFrame.new(0, -0.5, 0) | |
| 1987 | W.Parent = Limb | |
| 1988 | ||
| 1989 | end | |
| 1990 | --[ | |
| 1991 | local Bar = Instance.new("Part")
| |
| 1992 | Bar.TopSurface = 0 | |
| 1993 | Bar.BottomSurface = 0 | |
| 1994 | Bar.formFactor = "Symmetric" | |
| 1995 | Bar.Size = Vector3.new(1, 1, 1) | |
| 1996 | Bar.Transparency = 1 | |
| 1997 | Bar.CFrame = Torso2.CFrame * CFrame.new(0, 0.5, 0) | |
| 1998 | Bar.Parent = Character2 | |
| 1999 | local Weld = Instance.new("Weld")
| |
| 2000 | Weld.Part0 = Torso2 | |
| 2001 | Weld.Part1 = Bar | |
| 2002 | Weld.C0 = CFrame.new(0, 0.5, 0) | |
| 2003 | Weld.Parent = Torso2 | |
| 2004 | --]] | |
| 2005 | end | |
| 2006 | Character2.Parent = workspace | |
| 2007 | Debris:AddItem(Character2,5) | |
| 2008 | ||
| 2009 | return Character2,Torso2 | |
| 2010 | end)) | |
| 2011 | end | |
| 2012 | ||
| 2013 | --//=================================\\ | |
| 2014 | --|| DAMAGE FUNCTIONS | |
| 2015 | --\\=================================// | |
| 2016 | function StatLabel(CFRAME, TEXT, COLOR) | |
| 2017 | local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT()) | |
| 2018 | STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5))) | |
| 2019 | local BODYGYRO = IT("BodyGyro", STATPART)
| |
| 2020 | game:GetService("Debris"):AddItem(STATPART ,5)
| |
| 2021 | local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
| |
| 2022 | BILLBOARDGUI.Adornee = STATPART | |
| 2023 | BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0) | |
| 2024 | BILLBOARDGUI.StudsOffset = VT(-2, 2, 0) | |
| 2025 | BILLBOARDGUI.AlwaysOnTop = false | |
| 2026 | local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
| |
| 2027 | TEXTLABEL.BackgroundTransparency = 1 | |
| 2028 | TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0) | |
| 2029 | TEXTLABEL.Text = TEXT | |
| 2030 | TEXTLABEL.Font = SKILLFONT | |
| 2031 | TEXTLABEL.FontSize="Size42" | |
| 2032 | TEXTLABEL.TextColor3 = COLOR | |
| 2033 | TEXTLABEL.TextStrokeTransparency = 0 | |
| 2034 | TEXTLABEL.TextScaled = true | |
| 2035 | TEXTLABEL.TextWrapped = true | |
| 2036 | coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL) | |
| 2037 | for i = 1, 50 do | |
| 2038 | Swait() | |
| 2039 | STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2) | |
| 2040 | TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/50) | |
| 2041 | TEXTLABEL.TextStrokeTransparency = TEXTLABEL.TextTransparency | |
| 2042 | end | |
| 2043 | THEPART.Parent = nil | |
| 2044 | end),STATPART, TEXTLABEL) | |
| 2045 | end | |
| 2046 | ||
| 2047 | function StatLabel(CFRAME, TEXT, COLOR) | |
| 2048 | local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT()) | |
| 2049 | STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5))) | |
| 2050 | local BODYGYRO = IT("BodyGyro", STATPART)
| |
| 2051 | game:GetService("Debris"):AddItem(STATPART ,5)
| |
| 2052 | local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
| |
| 2053 | BILLBOARDGUI.Adornee = STATPART | |
| 2054 | BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0) | |
| 2055 | BILLBOARDGUI.StudsOffset = VT(-2, 2, 0) | |
| 2056 | BILLBOARDGUI.AlwaysOnTop = false | |
| 2057 | local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
| |
| 2058 | TEXTLABEL.BackgroundTransparency = 1 | |
| 2059 | TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0) | |
| 2060 | TEXTLABEL.Text = TEXT | |
| 2061 | TEXTLABEL.Font = "Fantasy" | |
| 2062 | TEXTLABEL.FontSize="Size42" | |
| 2063 | TEXTLABEL.TextColor3 = COLOR | |
| 2064 | TEXTLABEL.TextStrokeTransparency = 0 | |
| 2065 | TEXTLABEL.TextScaled = true | |
| 2066 | TEXTLABEL.TextWrapped = true | |
| 2067 | coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL) | |
| 2068 | for i = 1, 50 do | |
| 2069 | Swait() | |
| 2070 | STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2) | |
| 2071 | TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/50) | |
| 2072 | TEXTLABEL.TextStrokeTransparency = TEXTLABEL.TextTransparency | |
| 2073 | end | |
| 2074 | THEPART.Parent = nil | |
| 2075 | end),STATPART, TEXTLABEL) | |
| 2076 | end | |
| 2077 | ||
| 2078 | function StatLabel(CFRAME, TEXT, COLOR) | |
| 2079 | local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT()) | |
| 2080 | STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5))) | |
| 2081 | local BODYGYRO = IT("BodyGyro", STATPART)
| |
| 2082 | game:GetService("Debris"):AddItem(STATPART ,5)
| |
| 2083 | local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
| |
| 2084 | BILLBOARDGUI.Adornee = STATPART | |
| 2085 | BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0) | |
| 2086 | BILLBOARDGUI.StudsOffset = VT(-2, 2, 0) | |
| 2087 | BILLBOARDGUI.AlwaysOnTop = false | |
| 2088 | local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
| |
| 2089 | TEXTLABEL.BackgroundTransparency = 1 | |
| 2090 | TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0) | |
| 2091 | TEXTLABEL.Text = TEXT | |
| 2092 | TEXTLABEL.Font = SKILLFONT | |
| 2093 | TEXTLABEL.FontSize="Size42" | |
| 2094 | TEXTLABEL.TextColor3 = COLOR | |
| 2095 | TEXTLABEL.TextStrokeTransparency = 0 | |
| 2096 | TEXTLABEL.TextScaled = true | |
| 2097 | TEXTLABEL.TextWrapped = true | |
| 2098 | coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL) | |
| 2099 | for i = 1, 50 do | |
| 2100 | Swait() | |
| 2101 | STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2) | |
| 2102 | TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/50) | |
| 2103 | TEXTLABEL.TextStrokeTransparency = TEXTLABEL.TextTransparency | |
| 2104 | end | |
| 2105 | THEPART.Parent = nil | |
| 2106 | end),STATPART, TEXTLABEL) | |
| 2107 | end | |
| 2108 | ||
| 2109 | --//=================================\\ | |
| 2110 | --|| DAMAGING | |
| 2111 | --\\=================================// | |
| 2112 | function ApplyDamage(Humanoid,Damage,TorsoPart) | |
| 2113 | local defence = Instance.new("BoolValue",Humanoid.Parent)
| |
| 2114 | defence.Name = ("HitBy"..Player.Name)
| |
| 2115 | game:GetService("Debris"):AddItem(defence, 0.001)
| |
| 2116 | Damage = Damage * DAMAGEMULTIPLIER | |
| 2117 | if Humanoid.Health ~= 0 then | |
| 2118 | local CritChance = MRANDOM(1,100) | |
| 2119 | if Damage > Humanoid.Health then | |
| 2120 | Damage = math.ceil(Humanoid.Health) | |
| 2121 | if Damage == 0 then | |
| 2122 | Damage = 0.1 | |
| 2123 | end | |
| 2124 | end | |
| 2125 | Humanoid.Health = Humanoid.Health - Damage | |
| 2126 | end | |
| 2127 | end | |
| 2128 | ||
| 2129 | function ApplyAoE(POSITION,RANGE,MINDMG,MAXDMG,FLING,INSTAKILL) | |
| 2130 | local CHILDREN = workspace:GetDescendants() | |
| 2131 | for index, CHILD in pairs(CHILDREN) do | |
| 2132 | if CHILD.ClassName == "Model" and CHILD ~= Character and CHILD.Parent ~= Effects then | |
| 2133 | local HUM = CHILD:FindFirstChildOfClass("Humanoid")
| |
| 2134 | if HUM then | |
| 2135 | local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
| |
| 2136 | if TORSO then | |
| 2137 | if (TORSO.Position - POSITION).Magnitude <= RANGE then | |
| 2138 | if INSTAKILL == false then | |
| 2139 | CHILD:BreakJoints() | |
| 2140 | else | |
| 2141 | local DMG = MRANDOM(MINDMG,MAXDMG) | |
| 2142 | ApplyDamage(HUM,DMG,TORSO) | |
| 2143 | end | |
| 2144 | if FLING > 0 then | |
| 2145 | for _, c in pairs(CHILD:GetChildren()) do | |
| 2146 | if c:IsA("BasePart") then
| |
| 2147 | local bv = Instance.new("BodyVelocity")
| |
| 2148 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
| 2149 | bv.velocity = CF(POSITION,TORSO.Position).lookVector*FLING | |
| 2150 | bv.Parent = c | |
| 2151 | Debris:AddItem(bv,0.05) | |
| 2152 | end | |
| 2153 | end | |
| 2154 | end | |
| 2155 | end | |
| 2156 | end | |
| 2157 | end | |
| 2158 | end | |
| 2159 | end | |
| 2160 | end | |
| 2161 | ||
| 2162 | function KillChildren(v) | |
| 2163 | v:BreakJoints() | |
| 2164 | for _, c in pairs(v:GetChildren()) do | |
| 2165 | if c:IsA("BasePart") then
| |
| 2166 | if c.Transparency < 1 then | |
| 2167 | if c:FindFirstChildOfClass("Decal") then
| |
| 2168 | c:FindFirstChildOfClass("Decal"):remove()
| |
| 2169 | end | |
| 2170 | particles(c) | |
| 2171 | c.PE.Enabled = true | |
| 2172 | c.Parent = Effects | |
| 2173 | c.CanCollide = false | |
| 2174 | c.Material = "Neon" | |
| 2175 | c.Color = C3(0,0,0) | |
| 2176 | c.Transparency = 1 | |
| 2177 | local grav = Instance.new("BodyPosition",c)
| |
| 2178 | grav.P = 20000 | |
| 2179 | grav.maxForce = Vector3.new(math.huge,math.huge,math.huge) | |
| 2180 | grav.position = c.Position + VT(MRANDOM(-5,5),MRANDOM(-5,5),MRANDOM(-5,5)) | |
| 2181 | grav.Name = "GravityForce" | |
| 2182 | coroutine.resume(coroutine.create(function() | |
| 2183 | for i = 1, 20 do | |
| 2184 | Swait() | |
| 2185 | c.Transparency = c.Transparency + 1/20 | |
| 2186 | end | |
| 2187 | c.PE.Enabled = false | |
| 2188 | Debris:AddItem(c,2) | |
| 2189 | end)) | |
| 2190 | end | |
| 2191 | end | |
| 2192 | end | |
| 2193 | end | |
| 2194 | ||
| 2195 | function ApplyAoE(POSITION,RANGE) | |
| 2196 | local CHILDREN = workspace:GetDescendants() | |
| 2197 | for index, CHILD in pairs(CHILDREN) do | |
| 2198 | if CHILD.ClassName == "Model" and CHILD ~= Character then | |
| 2199 | local LISTED = false | |
| 2200 | for LIST = 1, #WHITELIST do | |
| 2201 | if WHITELIST[LIST] ~= nil then | |
| 2202 | if CHILD.Name == WHITELIST[LIST] then | |
| 2203 | LISTED = true | |
| 2204 | end | |
| 2205 | end | |
| 2206 | end | |
| 2207 | if LISTED == false then | |
| 2208 | local HUM = CHILD:FindFirstChildOfClass("Humanoid")
| |
| 2209 | if HUM then | |
| 2210 | local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
| |
| 2211 | if TORSO then | |
| 2212 | if (TORSO.Position - POSITION).Magnitude <= RANGE+TORSO.Size.Magnitude then | |
| 2213 | KillChildren(CHILD) | |
| 2214 | end | |
| 2215 | end | |
| 2216 | end | |
| 2217 | end | |
| 2218 | end | |
| 2219 | end | |
| 2220 | end | |
| 2221 | ||
| 2222 | function ApplyDamage(Humanoid,Damage,CritRate,CritMultiplier) | |
| 2223 | local defence = Instance.new("BoolValue",Humanoid.Parent)
| |
| 2224 | defence.Name = ("HitBy"..Player.Name)
| |
| 2225 | game:GetService("Debris"):AddItem(defence, 0.001)
| |
| 2226 | if Humanoid.Health ~= 0 then | |
| 2227 | local CritChance = MRANDOM(1,100) | |
| 2228 | if CritChance < CritRate + 1 then | |
| 2229 | Damage = Damage*CritMultiplier | |
| 2230 | end | |
| 2231 | if Damage > Humanoid.Health then | |
| 2232 | Damage = math.ceil(Humanoid.Health) | |
| 2233 | if Damage == 0 then | |
| 2234 | Damage = 0.1 | |
| 2235 | end | |
| 2236 | end | |
| 2237 | Humanoid.Health = Humanoid.Health - Damage | |
| 2238 | if Humanoid.Parent:FindFirstChild("Head") then
| |
| 2239 | CreateSound(HITPLAYERSOUNDS[MRANDOM(1,#HITPLAYERSOUNDS)], Humanoid.Parent.Head, 5, 1) | |
| 2240 | if CritChance < CritRate + 1 then | |
| 2241 | StatLabel(Humanoid.Parent.Head.CFrame * CF(0, 0 + (Humanoid.Parent.Head.Size.z - 1), 0), "CRIT//"..Damage, C3(1, 0, 0)) | |
| 2242 | else | |
| 2243 | StatLabel(Humanoid.Parent.Head.CFrame * CF(0, 0 + (Humanoid.Parent.Head.Size.z - 1), 0), Damage, SKILLTEXTCOLOR) | |
| 2244 | end | |
| 2245 | end | |
| 2246 | end | |
| 2247 | end | |
| 2248 | ||
| 2249 | function AoEDamage(position,radius,min,max,maxstrength,critrate,critmultiplier,CanBeDodgedByJumping) | |
| 2250 | local dmg = math.random(min,max) | |
| 2251 | for i,v in ipairs(workspace:GetChildren()) do | |
| 2252 | if v:FindFirstChild("HitBy"..Player.Name) == nil then
| |
| 2253 | local body = v:GetChildren() | |
| 2254 | for part = 1, #body do | |
| 2255 | if(v:FindFirstChild("HitBy"..Player.Name) == nil and (body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
| |
| 2256 | if(body[part].Position - position).Magnitude < radius then | |
| 2257 | if v.ClassName == "Model" then | |
| 2258 | if v:FindFirstChildOfClass("Humanoid") then
| |
| 2259 | if CanBeDodgedByJumping == true then | |
| 2260 | if body[part].Position.Y < position.Y+5 then | |
| 2261 | ApplyDamage(v:FindFirstChildOfClass("Humanoid"),dmg,critrate,critmultiplier)
| |
| 2262 | end | |
| 2263 | else | |
| 2264 | ApplyDamage(v:FindFirstChildOfClass("Humanoid"),dmg,critrate,critmultiplier)
| |
| 2265 | end | |
| 2266 | local bv = Instance.new("BodyVelocity")
| |
| 2267 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
| 2268 | bv.velocity = RootPart.CFrame.lookVector*maxstrength | |
| 2269 | bv.Parent = body[part] | |
| 2270 | Debris:AddItem(bv,0.2) | |
| 2271 | end | |
| 2272 | end | |
| 2273 | end | |
| 2274 | end | |
| 2275 | end | |
| 2276 | end | |
| 2277 | if v:FindFirstChild("HitBy"..Player.Name) then
| |
| 2278 | v:FindFirstChild("HitBy"..Player.Name):remove()
| |
| 2279 | end | |
| 2280 | end | |
| 2281 | end | |
| 2282 | ||
| 2283 | function Kill(Char) | |
| 2284 | local NewCharacter = IT("Model",Effects)
| |
| 2285 | NewCharacter.Name = "Ow im ded ;-;" | |
| 2286 | for _, c in pairs(Char:GetDescendants()) do | |
| 2287 | if c:IsA("BasePart") and c.Transparency == 0 then
| |
| 2288 | if c.Parent == Char then | |
| 2289 | getbloody(c,5) | |
| 2290 | end | |
| 2291 | c:BreakJoints() | |
| 2292 | c.Material = "Glass" | |
| 2293 | c.Color = C3(0.5,0,0) | |
| 2294 | c.CanCollide = true | |
| 2295 | c.Transparency = 0.3 | |
| 2296 | if c:FindFirstChildOfClass("SpecialMesh") then
| |
| 2297 | c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
| |
| 2298 | end | |
| 2299 | if c.Name == "Head" then | |
| 2300 | c:ClearAllChildren() | |
| 2301 | c.Size = VT(c.Size.Y,c.Size.Y,c.Size.Y) | |
| 2302 | end | |
| 2303 | if c.ClassName == "MeshPart" then | |
| 2304 | c.TextureID = "" | |
| 2305 | end | |
| 2306 | if c:FindFirstChildOfClass("BodyPosition") then
| |
| 2307 | c:FindFirstChildOfClass("BodyPosition"):remove()
| |
| 2308 | end | |
| 2309 | if c:FindFirstChildOfClass("ParticleEmitter") then
| |
| 2310 | c:FindFirstChildOfClass("ParticleEmitter"):remove()
| |
| 2311 | end | |
| 2312 | c.Parent = NewCharacter | |
| 2313 | c.Name = "DeadPart" | |
| 2314 | c.Velocity = VT(MRANDOM(-45,45),MRANDOM(-45,45),MRANDOM(-45,45))/15 | |
| 2315 | c.RotVelocity = VT(MRANDOM(-45,45),MRANDOM(-15,85),MRANDOM(-45,45)) | |
| 2316 | end | |
| 2317 | end | |
| 2318 | Char:remove() | |
| 2319 | Debris:AddItem(NewCharacter,5) | |
| 2320 | end | |
| 2321 | ||
| 2322 | function ApplyAoE(POSITION,RANGE,BRUTAL) | |
| 2323 | local CHILDREN = workspace:GetDescendants() | |
| 2324 | for index, CHILD in pairs(CHILDREN) do | |
| 2325 | if CHILD.ClassName == "Model" and CHILD ~= Character then | |
| 2326 | local HUM = CHILD:FindFirstChildOfClass("Humanoid")
| |
| 2327 | if HUM then | |
| 2328 | local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
| |
| 2329 | if TORSO then | |
| 2330 | if (TORSO.Position - POSITION).Magnitude <= RANGE then | |
| 2331 | if BRUTAL == true then | |
| 2332 | Kill(CHILD) | |
| 2333 | else | |
| 2334 | CHILD:BreakJoints() | |
| 2335 | end | |
| 2336 | end | |
| 2337 | end | |
| 2338 | end | |
| 2339 | end | |
| 2340 | end | |
| 2341 | end | |
| 2342 | ||
| 2343 | --//=================================\\ | |
| 2344 | --|| ATTACK FUNCTIONS AND STUFF | |
| 2345 | --\\=================================// | |
| 2346 | function Click() | |
| 2347 | ATTACK = true | |
| 2348 | Rooted = false | |
| 2349 | local HIT = nil | |
| 2350 | OFFSET = -45 | |
| 2351 | for i=0, 1, 0.1 / Animation_Speed do | |
| 2352 | Swait() | |
| 2353 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 2.5), RAD(0), RAD(45)), 0.15 / Animation_Speed) | |
| 2354 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0.5) * ANGLES(RAD(90), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 2 / Animation_Speed) | |
| 2355 | end | |
| 2356 | OFFSET = 45 | |
| 2357 | local PUNCH = CreatePart(3, Effects, "Granite", 0, 1, "Really black", "Hit", VT(0.7,0.7,0.7),false) | |
| 2358 | PUNCH.CanCollide = true | |
| 2359 | CreateWeldOrSnapOrMotor("Weld", RightArm, RightArm, PUNCH, CF(0,-1,0), CF(0, 0, 0))
| |
| 2360 | TAUNT = true | |
| 2361 | local TOUCH = PUNCH.Touched:Connect(function(hit) | |
| 2362 | if hit.Parent:FindFirstChildOfClass("Humanoid") then
| |
| 2363 | HIT = hit.Parent | |
| 2364 | end | |
| 2365 | end) | |
| 2366 | for i=0, 0.3, 0.1 / Animation_Speed do | |
| 2367 | Swait() | |
| 2368 | RootPart.CFrame = RootPart.CFrame*CF(0,0,-0.3) | |
| 2369 | if HIT ~= nil then | |
| 2370 | break | |
| 2371 | end | |
| 2372 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 2.5), RAD(0), RAD(-45)), 0.15 / Animation_Speed) | |
| 2373 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.45, 0.5, -0.75) * ANGLES(RAD(90), RAD(0), RAD(35)) * RIGHTSHOULDERC0, 2 / Animation_Speed) | |
| 2374 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(45), RAD(-12)) * ANGLES(RAD(-35), RAD(0), RAD(0)) * LEFTSHOULDERC0, 2 / Animation_Speed) | |
| 2375 | end | |
| 2376 | PUNCH:remove() | |
| 2377 | TOUCH:disconnect() | |
| 2378 | if HIT ~= nil then | |
| 2379 | for _, c in pairs(HIT:GetChildren()) do | |
| 2380 | if c:IsA("BasePart") then
| |
| 2381 | c.Anchored = true | |
| 2382 | end | |
| 2383 | end | |
| 2384 | Rooted = true | |
| 2385 | CreateSound(649634100, Torso, 10, 0.8) | |
| 2386 | CreateSound(1368573150, RightArm, 3, 1.5) | |
| 2387 | for i=0, 0.6, 0.1 / Animation_Speed do | |
| 2388 | Swait() | |
| 2389 | WACKYEFFECT({EffectType = "Block", Size = VT(3,3,3)/3, Size2 = VT(1,1,1)/3, Transparency = 0.5, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1.3,0), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = 1, SoundVolume = 5})
| |
| 2390 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 2.5), RAD(25), RAD(-45)), 0.05 / Animation_Speed) | |
| 2391 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.45, 0.5, -0.75) * ANGLES(RAD(90), RAD(0), RAD(35)) * RIGHTSHOULDERC0, 2 / Animation_Speed) | |
| 2392 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(45), RAD(-12)) * ANGLES(RAD(-35), RAD(0), RAD(0)) * LEFTSHOULDERC0, 2 / Animation_Speed) | |
| 2393 | end | |
| 2394 | for _, c in pairs(HIT:GetChildren()) do | |
| 2395 | if c:IsA("BasePart") then
| |
| 2396 | c.Anchored = false | |
| 2397 | end | |
| 2398 | end | |
| 2399 | KillChildren(HIT) | |
| 2400 | end | |
| 2401 | OFFSET = 0 | |
| 2402 | ATTACK = false | |
| 2403 | Rooted = false | |
| 2404 | TAUNT = false | |
| 2405 | end | |
| 2406 | ||
| 2407 | function Teleport() | |
| 2408 | ATTACK = true | |
| 2409 | Rooted = false | |
| 2410 | for i=0, 0.5, 0.1 / Animation_Speed do | |
| 2411 | Swait() | |
| 2412 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 2413 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.6, 0.75, -0.5) * ANGLES(RAD(0), RAD(-25), RAD(12)) * ANGLES(RAD(125 - 2.5 * COS(SINE / 12) + 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1.5 / Animation_Speed) | |
| 2414 | end | |
| 2415 | for e = 1, #BODY do | |
| 2416 | if BODY[e] ~= nil then | |
| 2417 | local STUFF = BODY[e] | |
| 2418 | local PART = STUFF[1] | |
| 2419 | if PART:IsA("BasePart") and PART ~= RootPart and PART.Name ~= "FaceGradient" and PART.Name ~= "Hair" and PART.Transparency ~= 1 then
| |
| 2420 | local PRT = PART:Clone() | |
| 2421 | PRT.Anchored = true | |
| 2422 | PRT.CanCollide = false | |
| 2423 | PRT.Material = "Neon" | |
| 2424 | PRT.Color = C3(0,0,0) | |
| 2425 | PRT.Name = "WarpEffect" | |
| 2426 | PRT.Parent = Effects | |
| 2427 | PRT.CFrame = PART.CFrame | |
| 2428 | PRT:BreakJoints() | |
| 2429 | if PRT:FindFirstChildOfClass("Sound") then
| |
| 2430 | PRT:FindFirstChildOfClass("Sound"):remove()
| |
| 2431 | end | |
| 2432 | if PRT:FindFirstChildOfClass("Decal") then
| |
| 2433 | PRT:FindFirstChildOfClass("Decal"):remove()
| |
| 2434 | end | |
| 2435 | coroutine.resume(coroutine.create(function() | |
| 2436 | for i = 1, 100 do | |
| 2437 | Swait() | |
| 2438 | PRT.Transparency = PRT.Transparency + 1/100 | |
| 2439 | end | |
| 2440 | PRT:remove() | |
| 2441 | end)) | |
| 2442 | end | |
| 2443 | end | |
| 2444 | end | |
| 2445 | CreateSound(217767125, Torso, 10, 1) | |
| 2446 | local POS = RootPart.Orientation | |
| 2447 | RootPart.CFrame = CF(Mouse.Hit.p+VT(0,6,0)) | |
| 2448 | RootPart.Orientation = POS | |
| 2449 | RootJoint.Parent = RootPart | |
| 2450 | for i=0, 0.5, 0.1 / Animation_Speed do | |
| 2451 | Swait() | |
| 2452 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 2453 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.6, 0.75, -0.5) * ANGLES(RAD(0), RAD(-15), RAD(12)) * ANGLES(RAD(175 - 2.5 * COS(SINE / 12) + 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 2.5 / Animation_Speed) | |
| 2454 | end | |
| 2455 | for i=0, 0.1, 0.1 / Animation_Speed do | |
| 2456 | Swait() | |
| 2457 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1, 0.5, 0.5) * ANGLES(RAD(0), RAD(-45), RAD(12)) * ANGLES(RAD(45 - 2.5 * COS(SINE / 12) + 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.75 / Animation_Speed) | |
| 2458 | end | |
| 2459 | ATTACK = false | |
| 2460 | Rooted = false | |
| 2461 | end | |
| 2462 | ||
| 2463 | function SpawnSmite(POS) | |
| 2464 | local HITFLOOR,HITPOS = Raycast(POS+VT(0,1,0), (CF(POS, POS + VT(0, -1, 0))).lookVector, 100, Character) | |
| 2465 | local EMITPOS = HITPOS | |
| 2466 | if HITFLOOR ~= nil then | |
| 2467 | if HITFLOOR.Parent:FindFirstChildOfClass("Humanoid") then
| |
| 2468 | HITFLOOR,HITPOS = Raycast(POS+VT(0,1,0), (CF(POS, POS + VT(0, -1, 0))).lookVector, 100, HITFLOOR.Parent) | |
| 2469 | EMITPOS = HITPOS | |
| 2470 | elseif HITFLOOR.Parent.Parent:FindFirstChildOfClass("Humanoid") then
| |
| 2471 | HITFLOOR,HITPOS = Raycast(POS+VT(0,1,0), (CF(POS, POS + VT(0, -1, 0))).lookVector, 100, HITFLOOR.Parent.Parent) | |
| 2472 | EMITPOS = HITPOS | |
| 2473 | end | |
| 2474 | end | |
| 2475 | if HITFLOOR ~= nil then | |
| 2476 | ApplyAoE(EMITPOS,10) | |
| 2477 | WACKYEFFECT({EffectType = "Sphere", Size = VT(0,100000,0), Size2 = VT(10,100000,10), Transparency = 0, Transparency2 = 1, CFrame = CF(EMITPOS) * ANGLES(RAD(MRANDOM(-15,15)), RAD(0), RAD(MRANDOM(-15,15))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 419011114, SoundPitch = 1, SoundVolume = 5})
| |
| 2478 | WACKYEFFECT({EffectType = "Block", Size = VT(0,0,0), Size2 = VT(10,10,10)*2, Transparency = 0, Transparency2 = 1, CFrame = CF(EMITPOS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = 1, SoundVolume = 5})
| |
| 2479 | WACKYEFFECT({EffectType = "Block", Size = VT(0,0,0), Size2 = VT(10,10,10)*1.5, Transparency = 0, Transparency2 = 1, CFrame = CF(EMITPOS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = 1, SoundVolume = 5})
| |
| 2480 | for i = 1, 5 do | |
| 2481 | local TOPOS = CF(EMITPOS)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))*CF(0,0,12) | |
| 2482 | WACKYEFFECT({EffectType = "Slash", Size = VT(0,0,0), Size2 = VT(0.2,0,0.2), Transparency = 0, Transparency2 = 1, CFrame = CF(EMITPOS,TOPOS.p) * ANGLES(RAD(90), RAD(0), RAD(0)), MoveToPos = TOPOS.p, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 419011114, SoundPitch = 1, SoundVolume = 5})
| |
| 2483 | end | |
| 2484 | end | |
| 2485 | end | |
| 2486 | ||
| 2487 | function SpawnMeteor(POS,SIZE,ISDEBREE,ORIPOS) | |
| 2488 | coroutine.resume(coroutine.create(function() | |
| 2489 | local METEOR = IT("Model",Effects)
| |
| 2490 | METEOR.Name = "Meteorite" | |
| 2491 | local CENTER = CreatePart(3, METEOR, "Granite", 0, 0, "Really black", "MeteorCenter", VT(5,5,5)*SIZE) | |
| 2492 | METEOR.PrimaryPart = CENTER | |
| 2493 | local PRT = CreatePart(3, METEOR, "Granite", 0, 0, "Really black", "MeteorCenter", VT(5,5,5)*SIZE) | |
| 2494 | PRT.CFrame = CENTER.CFrame*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
| 2495 | for i = 1, 15 do | |
| 2496 | local FIRE = CreatePart(3, METEOR, "Neon", 0, 0, "Really black", "Fire", VT(5.1,1,5.1)*SIZE) | |
| 2497 | FIRE.CFrame = CENTER.CFrame*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
| 2498 | end | |
| 2499 | if ISDEBREE ~= true then | |
| 2500 | METEOR:SetPrimaryPartCFrame(CF(POS) * ANGLES(RAD(MRANDOM(-15,15)), RAD(0), RAD(MRANDOM(-15,15)))*CF(0,500,0) * ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))) | |
| 2501 | else | |
| 2502 | METEOR:SetPrimaryPartCFrame(CF(ORIPOS,POS) * ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))) | |
| 2503 | end | |
| 2504 | local IMPACT = false | |
| 2505 | CreateSound(463593339, CENTER, 10, 0.6) | |
| 2506 | if SIZE >= 3.5 then | |
| 2507 | for i = 1, MRANDOM(3,7) do | |
| 2508 | SpawnMeteor(CF(POS) * ANGLES(RAD(0), RAD(MRANDOM(0,360)), RAD(0))*CF(0,0,SIZE*12).p,SIZE/MRANDOM(4,5),true,CENTER.CFrame*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))*CF(0,0,SIZE*15).p) | |
| 2509 | end | |
| 2510 | end | |
| 2511 | for i = 1, 200 do | |
| 2512 | Swait() | |
| 2513 | local HITFLOOR,HITPOS = Raycast(CENTER.Position, CF(CENTER.Position,POS).lookVector, 3, Character) | |
| 2514 | if HITFLOOR == nil then | |
| 2515 | local ORI = CENTER.Orientation | |
| 2516 | METEOR:SetPrimaryPartCFrame(CF(HITPOS) * ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))) | |
| 2517 | else | |
| 2518 | if HITFLOOR.Anchored == true then | |
| 2519 | CreateDebreeRing(HITFLOOR,HITPOS,30*SIZE,VT(6,6,6)*SIZE,5) | |
| 2520 | CreateFlyingDebree(HITFLOOR,CF(HITPOS),8,VT(4,4,4)*SIZE,5,175) | |
| 2521 | end | |
| 2522 | IMPACT = true | |
| 2523 | break | |
| 2524 | end | |
| 2525 | end | |
| 2526 | if IMPACT == true then | |
| 2527 | WACKYEFFECT({EffectType = "Block", Size = CENTER.Size, Size2 = VT(10,10,10)*4*SIZE, Transparency = 0, Transparency2 = 1, CFrame = CF(CENTER.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 130972023, SoundPitch = 1, SoundVolume = 5})
| |
| 2528 | WACKYEFFECT({EffectType = "Block", Size = CENTER.Size, Size2 = VT(10,10,10)*3*SIZE, Transparency = 0, Transparency2 = 1, CFrame = CF(CENTER.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 201858144, SoundPitch = 1, SoundVolume = 5})
| |
| 2529 | WACKYEFFECT({EffectType = "Sphere", Size = VT(SIZE*20,0,SIZE*20), Size2 = VT(0,SIZE*750,0), Transparency = 0, Transparency2 = 1, CFrame = CF(CENTER.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 130972023, SoundPitch = 1, SoundVolume = 5})
| |
| 2530 | ApplyAoE(CENTER.Position,30*SIZE) | |
| 2531 | end | |
| 2532 | METEOR:remove() | |
| 2533 | end)) | |
| 2534 | end | |
| 2535 | function Equivalent_Pain() | |
| 2536 | local HITFLOOR,HITPOS = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character) | |
| 2537 | if HITFLOOR then | |
| 2538 | ATTACK = true | |
| 2539 | Rooted = true | |
| 2540 | FULL = true | |
| 2541 | local GYRO = IT("BodyGyro",RootPart)
| |
| 2542 | GYRO.D = 25 | |
| 2543 | GYRO.P = 20000 | |
| 2544 | GYRO.MaxTorque = VT(0,math.huge,0) | |
| 2545 | for i=0, 0.3, 0.1 / Animation_Speed do | |
| 2546 | GYRO.cframe = CF(RootPart.Position,Mouse.Hit.p) | |
| 2547 | Swait() | |
| 2548 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(-25), RAD(0), RAD(-15)), 1 / Animation_Speed) | |
| 2549 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 2550 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0.3) * ANGLES(RAD(90), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 2551 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(45), RAD(-12)) * ANGLES(RAD(-25), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 2552 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(-35)), 1 / Animation_Speed) | |
| 2553 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(5)), 1 / Animation_Speed) | |
| 2554 | end | |
| 2555 | GYRO:remove() | |
| 2556 | CreateSound(12222200, RightArm, 10, 1) | |
| 2557 | for i=0, 0.4, 0.1 / Animation_Speed do | |
| 2558 | Swait() | |
| 2559 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, -0.3, -0.75) * ANGLES(RAD(40), RAD(0), RAD(35)), 1.5 / Animation_Speed) | |
| 2560 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 2561 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.45, -1.45) * ANGLES(RAD(75), RAD(0), RAD(35)) * RIGHTSHOULDERC0, 2 / Animation_Speed) | |
| 2562 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(-25), RAD(-12)) * ANGLES(RAD(-35), RAD(55), RAD(0)) * LEFTSHOULDERC0, 2 / Animation_Speed) | |
| 2563 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.3, -0.5) * ANGLES(RAD(0), RAD(55), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(65)), 1 / Animation_Speed) | |
| 2564 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.6, -0.2) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(-15)), 1 / Animation_Speed) | |
| 2565 | end | |
| 2566 | CreateSound(289842971, RightArm, 10, 1) | |
| 2567 | coroutine.resume(coroutine.create(function() | |
| 2568 | local HIT,POS = Raycast(Mouse.Hit.p+VT(0,1,0), (CF(Mouse.Hit.p+VT(0,1,0), Mouse.Hit.p-VT(0,1,0))).lookVector, 45, Character) | |
| 2569 | local ECHO = POS | |
| 2570 | if HITFLOOR.Parent:FindFirstChildOfClass("Humanoid") then
| |
| 2571 | HIT,POS = Raycast(ECHO+VT(0,1,0), (CF(ECHO, ECHO + VT(0, -1, 0))).lookVector, 100, HITFLOOR.Parent) | |
| 2572 | ECHO = POS | |
| 2573 | elseif HITFLOOR.Parent.Parent:FindFirstChildOfClass("Humanoid") then
| |
| 2574 | HIT,POS = Raycast(ECHO+VT(0,1,0), (CF(ECHO, ECHO + VT(0, -1, 0))).lookVector, 100, HITFLOOR.Parent.Parent) | |
| 2575 | ECHO = POS | |
| 2576 | end | |
| 2577 | if ECHO.Y == HITPOS.Y then | |
| 2578 | local DISTANCE = (HITPOS - ECHO).Magnitude/3 | |
| 2579 | local CFRAME = CF(HITPOS,ECHO) | |
| 2580 | local RANGE = math.ceil(DISTANCE) | |
| 2581 | for i = 1, RANGE-1 do | |
| 2582 | Swait(3) | |
| 2583 | local A = CFRAME*CF(0,0,-i*3) | |
| 2584 | ApplyAoE(A.p,4) | |
| 2585 | CreateFlyingDebree(HITFLOOR,A,2,VT(2,2,2),2,65) | |
| 2586 | end | |
| 2587 | local SIZE = 3 | |
| 2588 | local POS = CFRAME*CF(0,0,-RANGE*3).p | |
| 2589 | WACKYEFFECT({Time = 75, EffectType = "Sphere", Size = VT(55,0,55)*SIZE, Size2 = VT(55,15,55)*SIZE, Transparency = 0, Transparency2 = 1, CFrame = CF(POS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 130972023, SoundPitch = 0.8, SoundVolume = 10})
| |
| 2590 | WACKYEFFECT({EffectType = "Sphere", Size = VT(10,250,10)*SIZE, Size2 = VT(20,1000,20)*SIZE, Transparency = 0, Transparency2 = 1, CFrame = CF(POS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 178452241, SoundPitch = 1, SoundVolume = 10})
| |
| 2591 | WACKYEFFECT({EffectType = "Sphere", Size = VT(30,150,30)*SIZE, Size2 = VT(50,300,50)*SIZE, Transparency = 0, Transparency2 = 1, CFrame = CF(POS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 178452241, SoundPitch = 1, SoundVolume = 10})
| |
| 2592 | for i = 1, 9 do | |
| 2593 | WACKYEFFECT({TIME = 65, EffectType = "Sphere", Size = VT(5,5,0)*SIZE, Size2 = VT(0,0,35)*SIZE, Transparency = 0, Transparency2 = 1, CFrame = CF(POS+VT(0,15*SIZE,0))*ANGLES(RAD(0),RAD((360/9)*i),RAD(0))*ANGLES(RAD(25),RAD(0),RAD(0))*CF(0,0,-25*SIZE), MoveToPos = CF(POS+VT(0,15*SIZE,0))*ANGLES(RAD(0),RAD((360/9)*i),RAD(0))*ANGLES(RAD(25),RAD(0),RAD(0))*CF(0,0,-55*SIZE).p, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = 0.8, SoundVolume = 5})
| |
| 2594 | end | |
| 2595 | for i = 1, 9 do | |
| 2596 | WACKYEFFECT({TIME = 65, EffectType = "Sphere", Size = VT(5,5,0)*SIZE, Size2 = VT(0,0,35)*SIZE, Transparency = 0, Transparency2 = 1, CFrame = CF(POS+VT(0,5*SIZE,0))*ANGLES(RAD(0),RAD((360/9)*i),RAD(0))*ANGLES(RAD(25),RAD(0),RAD(0))*CF(0,0,-25*SIZE), MoveToPos = CF(POS+VT(0,5*SIZE,0))*ANGLES(RAD(0),RAD((360/9)*i),RAD(0))*ANGLES(RAD(25),RAD(0),RAD(0))*CF(0,0,-55*SIZE).p, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = 0.8, SoundVolume = 5})
| |
| 2597 | end | |
| 2598 | ApplyAoE(POS,30*SIZE) | |
| 2599 | CreateDebreeRing(HITFLOOR,POS,30*SIZE,VT(8,8,8)*SIZE,5) | |
| 2600 | CreateDebreeRing(HITFLOOR,POS,50*SIZE,VT(2,2,2)*SIZE,5) | |
| 2601 | end | |
| 2602 | end)) | |
| 2603 | for i=0, 0.6, 0.1 / Animation_Speed do | |
| 2604 | Swait() | |
| 2605 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, -0.3, -0.75) * ANGLES(RAD(40), RAD(0), RAD(35)), 1.5 / Animation_Speed) | |
| 2606 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 2607 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.45, -1.45) * ANGLES(RAD(75), RAD(0), RAD(35)) * RIGHTSHOULDERC0, 2 / Animation_Speed) | |
| 2608 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(-25), RAD(-12)) * ANGLES(RAD(-35), RAD(55), RAD(0)) * LEFTSHOULDERC0, 2 / Animation_Speed) | |
| 2609 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.3, -0.5) * ANGLES(RAD(0), RAD(55), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(65)), 1 / Animation_Speed) | |
| 2610 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.6, -0.2) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(-15)), 1 / Animation_Speed) | |
| 2611 | end | |
| 2612 | FULL = false | |
| 2613 | ATTACK = false | |
| 2614 | Rooted = false | |
| 2615 | end | |
| 2616 | end | |
| 2617 | ||
| 2618 | function ReeeEEEEEE() | |
| 2619 | ATTACK = true | |
| 2620 | Rooted = false | |
| 2621 | Speed = 12 | |
| 2622 | local FX = CreateSound(198165368, Head, 4, 0.5, false) | |
| 2623 | repeat | |
| 2624 | Swait() | |
| 2625 | FX.Parent = Head | |
| 2626 | local CHILDREN = workspace:GetDescendants() | |
| 2627 | for index, CHILD in pairs(CHILDREN) do | |
| 2628 | if CHILD.ClassName == "Model" and CHILD ~= Character then | |
| 2629 | local HUM = CHILD:FindFirstChildOfClass("Humanoid")
| |
| 2630 | if HUM then | |
| 2631 | local TORSO = CHILD:FindFirstChild("Head")
| |
| 2632 | if TORSO then | |
| 2633 | if (TORSO.Position - Head.Position).Magnitude <= 25 then | |
| 2634 | WACKYEFFECT({Time = 45, EffectType = "Sphere", Size = VT(1,1,1), Size2 = VT(5,5,5), Transparency = 0, Transparency2 = 1, CFrame = CF(TORSO.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
| |
| 2635 | TORSO:remove() | |
| 2636 | if CHILD:FindFirstChild("Torso") then
| |
| 2637 | Ragdoll(CHILD,Torso,true) | |
| 2638 | elseif CHILD:FindFirstChild("UpperTorso") then
| |
| 2639 | R15Ragdoll(CHILD,true) | |
| 2640 | end | |
| 2641 | end | |
| 2642 | end | |
| 2643 | end | |
| 2644 | end | |
| 2645 | end | |
| 2646 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0.5, 0) * ANGLES(RAD(-45), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 2647 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-45), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 2648 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-35), RAD(0), RAD(15)) * ANGLES(RAD(0), RAD(15), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 2649 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-35), RAD(0), RAD(-15)) * ANGLES(RAD(0), RAD(-15), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 2650 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(-45), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 2651 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(-45), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 2652 | until FX.Playing == false | |
| 2653 | Speed = 16 | |
| 2654 | ATTACK = false | |
| 2655 | Rooted = false | |
| 2656 | end | |
| 2657 | ||
| 2658 | function Charge(TIME,GYRO) | |
| 2659 | local SND = CreateSound(ENERGYSOUND,Torso,6,TIME,false) | |
| 2660 | local G = nil | |
| 2661 | if GYRO == true then | |
| 2662 | G = IT("BodyGyro",RootPart)
| |
| 2663 | G.D = 250 | |
| 2664 | G.P = 200000 | |
| 2665 | G.MaxTorque = VT(math.huge,math.huge,math.huge) | |
| 2666 | end | |
| 2667 | for i=0, TIME, 0.1 / Animation_Speed do | |
| 2668 | Swait() | |
| 2669 | if G then | |
| 2670 | G.cframe = CF(RootPart.Position,Mouse.Hit.p) | |
| 2671 | end | |
| 2672 | WACKYEFFECT({TIME = 25, EffectType = "Sphere", Size = VT(1.2,1.2,1.2), Size2 = VT(0,0,0), Transparency = 0.5, Transparency2 = 1, CFrame = BasePart.CFrame, MoveToPos = BasePart.CFrame*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))*CF(0,0,-4).p, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
| |
| 2673 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
| 2674 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
| 2675 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(-45)) * RIGHTSHOULDERC0, 2 / Animation_Speed) | |
| 2676 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(45)) * LEFTSHOULDERC0, 2 / Animation_Speed) | |
| 2677 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
| 2678 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
| 2679 | end | |
| 2680 | SND:remove() | |
| 2681 | if G then | |
| 2682 | return G | |
| 2683 | end | |
| 2684 | end | |
| 2685 | ||
| 2686 | function Corrupted_Beam() | |
| 2687 | ATTACK = true | |
| 2688 | Rooted = false | |
| 2689 | local GRAV = IT("BodyPosition",RootPart)
| |
| 2690 | GRAV.D = 75 | |
| 2691 | GRAV.P = 20000 | |
| 2692 | GRAV.MaxForce = VT(math.huge,math.huge,math.huge) | |
| 2693 | GRAV.Position = RootPart.Position | |
| 2694 | local GYRO = Charge(2,true) | |
| 2695 | local BEAM = CreatePart(3, Effects, "Neon", 0, 0, "Black", "Beam", VT(15,15,0)) | |
| 2696 | MakeForm(BEAM,"Ball") | |
| 2697 | CreateSound(BEAMSOUND,BEAM,10,1,false) | |
| 2698 | CreateSound(BEAMSOUND,BEAM,10,0.9,false) | |
| 2699 | CreateSound(BEAMSOUND,BEAM,10,0.8,false) | |
| 2700 | for i = 1, 150 do | |
| 2701 | Swait() | |
| 2702 | BEAM.Size = BEAM.Size + VT(-0.1,-0.1,2) | |
| 2703 | ApplyAoE(BEAM.CFrame*CF(0,0,-BEAM.Size.Z/2).p,BEAM.Size.Y/2,50,200,0,false) | |
| 2704 | WACKYEFFECT({TIME = 25, EffectType = "Sphere", Size = VT(3,3,3), Size2 = VT(0,0,0), Transparency = 0.5, Transparency2 = 1, CFrame = BEAM.CFrame*CF(0,0,BEAM.Size.Z/2), MoveToPos = BEAM.CFrame*CF(0,0,BEAM.Size.Z/2)*ANGLES(RAD(90),RAD(MRANDOM(0,360)),RAD(0))*CF(0,0.3,-25).p, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
| |
| 2705 | BEAM.CFrame = CF(Torso.Position,Torso.CFrame*CF(0,0,-1).p)*CF(0,0,-2-(BEAM.Size.Z/2)) | |
| 2706 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
| 2707 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
| 2708 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 2 / Animation_Speed) | |
| 2709 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 2 / Animation_Speed) | |
| 2710 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
| 2711 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
| 2712 | end | |
| 2713 | GRAV:remove() | |
| 2714 | BEAM:remove() | |
| 2715 | GYRO:remove() | |
| 2716 | ATTACK = false | |
| 2717 | Rooted = false | |
| 2718 | end | |
| 2719 | ||
| 2720 | function Corrupted_Explosion() | |
| 2721 | ATTACK = true | |
| 2722 | Rooted = true | |
| 2723 | for i=0, 1, 0.1 / Animation_Speed do | |
| 2724 | Swait() | |
| 2725 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, -0.3, 0) * ANGLES(RAD(0), RAD(0), RAD(-75)), 0.6 / Animation_Speed) | |
| 2726 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(75)), 0.6 / Animation_Speed) | |
| 2727 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(15)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed) | |
| 2728 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)) * LEFTSHOULDERC0, 0.1 / Animation_Speed) | |
| 2729 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(0)), 0.5 / Animation_Speed) | |
| 2730 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(0)), 0.5 / Animation_Speed) | |
| 2731 | end | |
| 2732 | for i=0, 0.4, 0.1 / Animation_Speed do | |
| 2733 | Swait() | |
| 2734 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, -1, -0.3) * ANGLES(RAD(75), RAD(0), RAD(75)), 1 / Animation_Speed) | |
| 2735 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-75)), 1/ Animation_Speed) | |
| 2736 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 2737 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 2738 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.01) * ANGLES(RAD(75), RAD(25), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 2739 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 2740 | end | |
| 2741 | local BEAM = CreatePart(3, Effects, "Neon", 0, 0, "Black", "Beam", VT(0,0,0)) | |
| 2742 | local BEAM2 = CreatePart(3, Effects, "Neon", 0, 0, "Black", "Beam", VT(0,0,0)) | |
| 2743 | MakeForm(BEAM,"Ball") | |
| 2744 | MakeForm(BEAM2,"Ball") | |
| 2745 | BEAM.CFrame = CF(RootPart.Position) | |
| 2746 | BEAM2.CFrame = CF(RootPart.Position) | |
| 2747 | CreateSound(EXPLOSIONSOUND,RootPart,10,1,false) | |
| 2748 | for i=1, 100 do | |
| 2749 | Swait() | |
| 2750 | BEAM.Size = BEAM.Size + VT(0.7,8,0.7) | |
| 2751 | BEAM2.Size = BEAM2.Size + VT(2,2,2) | |
| 2752 | ApplyAoE(BEAM2.Position,BEAM2.Size.Z/2,5,5,15,true) | |
| 2753 | BEAM.CFrame = CF(RootPart.Position) | |
| 2754 | BEAM2.CFrame = CF(RootPart.Position) | |
| 2755 | WACKYEFFECT({TIME = 5+i, EffectType = "Swirl", Size = BEAM2.Size*1.15, Size2 = VT(0,BEAM.Size.Y,0), Transparency = 0.8, Transparency2 = 1, CFrame = BEAM.CFrame * ANGLES(RAD(0), RAD(i*5), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = i/8, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
| |
| 2756 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, -1, -0.3) * ANGLES(RAD(75), RAD(0), RAD(75)), 1 / Animation_Speed) | |
| 2757 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-75)), 1/ Animation_Speed) | |
| 2758 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 2759 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 2760 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.01) * ANGLES(RAD(75), RAD(25), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 2761 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 2762 | end | |
| 2763 | WACKYEFFECT({TIME = 75, EffectType = "Sphere", Size = BEAM.Size, Size2 = VT(0,BEAM.Size.Y,0), Transparency = 0, Transparency2 = 0, CFrame = BEAM.CFrame, MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
| |
| 2764 | WACKYEFFECT({TIME = 75, EffectType = "Sphere", Size = BEAM2.Size, Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 0.6, CFrame = BEAM2.CFrame, MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
| |
| 2765 | BEAM2:remove() | |
| 2766 | BEAM:remove() | |
| 2767 | ATTACK = false | |
| 2768 | Rooted = false | |
| 2769 | end | |
| 2770 | ||
| 2771 | function Corrupted_Immobilization() | |
| 2772 | ATTACK = true | |
| 2773 | Rooted = true | |
| 2774 | Charge(2,false) | |
| 2775 | local SND = CreateSound(EXPLOSIONSOUND,RootPart,10,1,false) | |
| 2776 | local SND2 = CreateSound(ENERGYSOUND,RootPart,10,1,false) | |
| 2777 | for i = 1, 60 do | |
| 2778 | Swait() | |
| 2779 | ApplyAoE(RootPart.Position,i*1.3,10,20,-200,true) | |
| 2780 | SND.Pitch = SND.Pitch - 1/60 | |
| 2781 | SND2.Pitch = SND.Pitch | |
| 2782 | WACKYEFFECT({TIME = 4, EffectType = "Wave", Size = VT(i*2,10,i*2), Size2 = VT(i*2,10,i*2), Transparency = 0.9, Transparency2 = 1, CFrame = CF(RootPart.Position-VT(0,3,0)) * ANGLES(RAD(0), RAD(i*5), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = i/8, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
| |
| 2783 | WACKYEFFECT({TIME = math.ceil(15-(i/10)), EffectType = "Wave", Size = VT(0,10,0), Size2 = VT(i*2,6,i*2), Transparency = 0.8, Transparency2 = 1, CFrame = CF(RootPart.Position-VT(0,3,0)) * ANGLES(RAD(0), RAD(i*5), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = i/8, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
| |
| 2784 | WACKYEFFECT({TIME = math.ceil(15-(i/10)), EffectType = "Wave", Size = VT(0,6,0), Size2 = VT(i*1.6,10,i*1.6), Transparency = 0.8, Transparency2 = 1, CFrame = CF(RootPart.Position-VT(0,3,0)) * ANGLES(RAD(MRANDOM(-5,5)), RAD(i*5), RAD(MRANDOM(-5,5))), MoveToPos = nil, RotationX = 0, RotationY = i/8, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
| |
| 2785 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 2786 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 2787 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-45), RAD(-45), RAD(45)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 2788 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-45), RAD(45), RAD(-45)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 2789 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 2790 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-65), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 2791 | end | |
| 2792 | SND:remove() | |
| 2793 | SND2:remove() | |
| 2794 | ATTACK = false | |
| 2795 | Rooted = false | |
| 2796 | end | |
| 2797 | ||
| 2798 | --//=================================\\ | |
| 2799 | --|| ASSIGN THINGS TO KEYS | |
| 2800 | --\\=================================// | |
| 2801 | ||
| 2802 | function MouseDown(Mouse) | |
| 2803 | if ATTACK == false then | |
| 2804 | Click() | |
| 2805 | end | |
| 2806 | end | |
| 2807 | ||
| 2808 | function MouseUp(Mouse) | |
| 2809 | HOLD = false | |
| 2810 | end | |
| 2811 | ||
| 2812 | function KeyDown(Key) | |
| 2813 | KEYHOLD = true | |
| 2814 | if Key == "z" and ATTACK == false then | |
| 2815 | Corrupted_Beam() | |
| 2816 | end | |
| 2817 | ||
| 2818 | if Key == "e" and ATTACK == false then | |
| 2819 | ReeeEEEEEE() | |
| 2820 | end | |
| 2821 | ||
| 2822 | if Key == "r" and ATTACK == false then | |
| 2823 | Teleport() | |
| 2824 | end | |
| 2825 | ||
| 2826 | if Key == "q" and ATTACK == false then | |
| 2827 | Equivalent_Pain() | |
| 2828 | end | |
| 2829 | ||
| 2830 | if Key == "x" and ATTACK == false then | |
| 2831 | Corrupted_Explosion() | |
| 2832 | end | |
| 2833 | ||
| 2834 | if Key == "c" and ATTACK == false then | |
| 2835 | Corrupted_Immobilization() | |
| 2836 | elseif Key == "1" and ATTACK == false then | |
| 2837 | if CHOICE ~= 1 then | |
| 2838 | CHOICE = 1 | |
| 2839 | sick:Play() | |
| 2840 | end | |
| 2841 | elseif Key == "2" and ATTACK == false then | |
| 2842 | if CHOICE ~= 2 then | |
| 2843 | CHOICE = 2 | |
| 2844 | sick:Play() | |
| 2845 | end | |
| 2846 | elseif Key == "3" and ATTACK == false then | |
| 2847 | if CHOICE ~= 3 then | |
| 2848 | CHOICE = 3 | |
| 2849 | sick:Play() | |
| 2850 | end | |
| 2851 | elseif Key == "4" and ATTACK == false then | |
| 2852 | if CHOICE ~= 4 then | |
| 2853 | CHOICE = 4 | |
| 2854 | sick:Play() | |
| 2855 | end | |
| 2856 | ||
| 2857 | end | |
| 2858 | end | |
| 2859 | ||
| 2860 | ||
| 2861 | ||
| 2862 | function KeyUp(Key) | |
| 2863 | KEYHOLD = false | |
| 2864 | end | |
| 2865 | ||
| 2866 | Mouse.Button1Down:connect(function(NEWKEY) | |
| 2867 | MouseDown(NEWKEY) | |
| 2868 | end) | |
| 2869 | Mouse.Button1Up:connect(function(NEWKEY) | |
| 2870 | MouseUp(NEWKEY) | |
| 2871 | end) | |
| 2872 | Mouse.KeyDown:connect(function(NEWKEY) | |
| 2873 | KeyDown(NEWKEY) | |
| 2874 | end) | |
| 2875 | Mouse.KeyUp:connect(function(NEWKEY) | |
| 2876 | KeyUp(NEWKEY) | |
| 2877 | end) | |
| 2878 | ||
| 2879 | --//=================================\\ | |
| 2880 | --\\=================================// | |
| 2881 | ||
| 2882 | function unanchor() | |
| 2883 | if UNANCHOR == true then | |
| 2884 | g = Character:GetChildren() | |
| 2885 | for i = 1, #g do | |
| 2886 | if g[i].ClassName == "Part" then | |
| 2887 | g[i].Anchored = false | |
| 2888 | end | |
| 2889 | end | |
| 2890 | end | |
| 2891 | end | |
| 2892 | ||
| 2893 | --//=================================\\ | |
| 2894 | --|| WRAP THE WHOLE SCRIPT UP | |
| 2895 | --\\=================================// | |
| 2896 | ||
| 2897 | Humanoid.Changed:connect(function(Jump) | |
| 2898 | if Jump == "Jump" and (Disable_Jump == true) then | |
| 2899 | Humanoid.Jump = false | |
| 2900 | end | |
| 2901 | end) | |
| 2902 | ||
| 2903 | while true do | |
| 2904 | Swait() | |
| 2905 | script.Parent = WEAPONGUI | |
| 2906 | ANIMATE.Parent = nil | |
| 2907 | if Humanoid then | |
| 2908 | local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION) | |
| 2909 | IDLEANIMATION:Play() | |
| 2910 | end | |
| 2911 | SINE = SINE + CHANGE | |
| 2912 | local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude | |
| 2913 | local TORSOVERTICALVELOCITY = RootPart.Velocity.y | |
| 2914 | local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character) | |
| 2915 | local WALKSPEEDVALUE = 5 / (Humanoid.WalkSpeed / 16) | |
| 2916 | if ANIM == "Walk" and TORSOVELOCITY > 1 then | |
| 2917 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.15 * COS(SINE / (WALKSPEEDVALUE / 2))) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
| 2918 | Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * 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) | |
| 2919 | RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(45 * COS(SINE / WALKSPEEDVALUE))), 1 / Animation_Speed) | |
| 2920 | LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ -0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(45 * COS(SINE / WALKSPEEDVALUE))), 1 / Animation_Speed) | |
| 2921 | elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then | |
| 2922 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2923 | Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2924 | RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2925 | LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2926 | end | |
| 2927 | if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then | |
| 2928 | ANIM = "Jump" | |
| 2929 | if ATTACK == false then | |
| 2930 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2931 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2932 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed) | |
| 2933 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
| 2934 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.3) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed) | |
| 2935 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed) | |
| 2936 | end | |
| 2937 | elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then | |
| 2938 | ANIM = "Fall" | |
| 2939 | if ATTACK == false then | |
| 2940 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2941 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 2942 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed) | |
| 2943 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
| 2944 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed) | |
| 2945 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed) | |
| 2946 | end | |
| 2947 | elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then | |
| 2948 | ANIM = "Idle" | |
| 2949 | if ATTACK == false then | |
| 2950 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0 - 0.05 * COS(SINE / 12), 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(-2 + 2 * COS(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
| 2951 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
| 2952 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(-15), RAD(5 + 1 * COS(SINE / 12))) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
| 2953 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(15), RAD(-5 - 1 * COS(SINE / 12))) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
| 2954 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(-2 + 2 * COS(SINE / 12)), RAD(74), RAD(0)) * ANGLES(RAD(-2), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
| 2955 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(-2 + 2 * COS(SINE / 12)), RAD(-74), RAD(0)) * ANGLES(RAD(-2), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
| 2956 | if VALUE1 == false and MRANDOM(1,200) == 1 then | |
| 2957 | coroutine.resume(coroutine.create(function() | |
| 2958 | VALUE1 = true | |
| 2959 | for i = 1, 25 do | |
| 2960 | Swait() | |
| 2961 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(-5), RAD((15+MRANDOM(-15,15)/15)), RAD(0)), 3 / Animation_Speed) | |
| 2962 | ||
| 2963 | end | |
| 2964 | VALUE1 = false | |
| 2965 | end)) | |
| 2966 | end | |
| 2967 | end | |
| 2968 | ||
| 2969 | elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then | |
| 2970 | ANIM = "Walk" | |
| 2971 | if ATTACK == false then | |
| 2972 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
| 2973 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 8 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
| 2974 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0.15 * SIN(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(25 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(5)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 2975 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.15 * SIN(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(-25 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 2976 | RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 2 / Animation_Speed) | |
| 2977 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(15)), 2 / Animation_Speed) | |
| 2978 | end | |
| 2979 | end | |
| 2980 | ||
| 2981 | ||
| 2982 | sick.Parent = Torso | |
| 2983 | sick.Playing = true | |
| 2984 | ||
| 2985 | ||
| 2986 | unanchor() | |
| 2987 | Humanoid.MaxHealth = "inf" | |
| 2988 | Humanoid.Health = "inf" | |
| 2989 | if Rooted == false then | |
| 2990 | Disable_Jump = false | |
| 2991 | Humanoid.WalkSpeed = Speed | |
| 2992 | elseif Rooted == true then | |
| 2993 | Disable_Jump = true | |
| 2994 | Humanoid.WalkSpeed = 0 | |
| 2995 | end | |
| 2996 | end | |
| 2997 | --//=================================\\ | |
| 2998 | --\\=================================// | |
| 2999 | ||
| 3000 | ||
| 3001 | ||
| 3002 | ||
| 3003 | ||
| 3004 | --//====================================================\\-- | |
| 3005 | --|| END OF SCRIPT | |
| 3006 | --\\====================================================//-- |