SHOW:
|
|
- or go back to the newest paste.
| 1 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
| |
| 2 | local Player,game,owner = owner,game | |
| 3 | local RealPlayer = Player | |
| 4 | do | |
| 5 | print("FE Compatibility code V2 by Mokiros")
| |
| 6 | local RealPlayer = RealPlayer | |
| 7 | script.Parent = RealPlayer.Character | |
| 8 | ||
| 9 | --Fake event to make stuff like Mouse.KeyDown work | |
| 10 | local Disconnect_Function = function(this) | |
| 11 | this[1].Functions[this[2]] = nil | |
| 12 | end | |
| 13 | local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
| |
| 14 | local FakeEvent_Metatable = {__index={
| |
| 15 | Connect = function(this,f) | |
| 16 | local i = tostring(math.random(0,10000)) | |
| 17 | while this.Functions[i] do | |
| 18 | i = tostring(math.random(0,10000)) | |
| 19 | end | |
| 20 | this.Functions[i] = f | |
| 21 | return setmetatable({this,i},Disconnect_Metatable)
| |
| 22 | end | |
| 23 | }} | |
| 24 | FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect | |
| 25 | local function fakeEvent() | |
| 26 | return setmetatable({Functions={}},FakeEvent_Metatable)
| |
| 27 | end | |
| 28 | ||
| 29 | --Creating fake input objects with fake variables | |
| 30 | local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
| |
| 31 | FakeMouse.keyUp = FakeMouse.KeyUp | |
| 32 | FakeMouse.keyDown = FakeMouse.KeyDown | |
| 33 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
| |
| 34 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
| |
| 35 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
| |
| 36 | end} | |
| 37 | --Merged 2 functions into one by checking amount of arguments | |
| 38 | CAS.UnbindAction = CAS.BindAction | |
| 39 | ||
| 40 | --This function will trigger the events that have been :Connect()'ed | |
| 41 | local function TriggerEvent(self,ev,...) | |
| 42 | for _,f in pairs(self[ev].Functions) do | |
| 43 | f(...) | |
| 44 | end | |
| 45 | end | |
| 46 | FakeMouse.TriggerEvent = TriggerEvent | |
| 47 | UIS.TriggerEvent = TriggerEvent | |
| 48 | ||
| 49 | --Client communication | |
| 50 | local Event = Instance.new("RemoteEvent")
| |
| 51 | Event.Name = "UserInput_Event" | |
| 52 | Event.OnServerEvent:Connect(function(plr,io) | |
| 53 | if plr~=RealPlayer then return end | |
| 54 | FakeMouse.Target = io.Target | |
| 55 | FakeMouse.Hit = io.Hit | |
| 56 | if not io.isMouse then | |
| 57 | local b = io.UserInputState == Enum.UserInputState.Begin | |
| 58 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 59 | return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up") | |
| 60 | end | |
| 61 | if io.UserInputType == Enum.UserInputType.MouseButton2 then | |
| 62 | return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up") | |
| 63 | end | |
| 64 | for _,t in pairs(CAS.Actions) do | |
| 65 | for _,k in pairs(t.Keys) do | |
| 66 | if k==io.KeyCode then | |
| 67 | t.Function(t.Name,io.UserInputState,io) | |
| 68 | end | |
| 69 | end | |
| 70 | end | |
| 71 | FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
| 72 | UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false) | |
| 73 | end | |
| 74 | end) | |
| 75 | Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
| |
| 76 | local Mouse = owner:GetMouse() | |
| 77 | local UIS = game:GetService("UserInputService")
| |
| 78 | local input = function(io,RobloxHandled) | |
| 79 | if RobloxHandled then return end | |
| 80 | --Since InputObject is a client-side instance, we create and pass table instead | |
| 81 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
| |
| 82 | end | |
| 83 | UIS.InputBegan:Connect(input) | |
| 84 | UIS.InputEnded:Connect(input) | |
| 85 | local h,t | |
| 86 | --Give the server mouse data every second frame, but only if the values changed | |
| 87 | --If player is not moving their mouse, client won't fire events | |
| 88 | local HB = game:GetService("RunService").Heartbeat
| |
| 89 | while true do | |
| 90 | if h~=Mouse.Hit or t~=Mouse.Target then | |
| 91 | h,t=Mouse.Hit,Mouse.Target | |
| 92 | Event:FireServer({isMouse=true,Target=t,Hit=h})
| |
| 93 | end | |
| 94 | --Wait 2 frames | |
| 95 | for i=1,2 do | |
| 96 | HB:Wait() | |
| 97 | end | |
| 98 | end]==],script) | |
| 99 | ||
| 100 | ----Sandboxed game object that allows the usage of client-side methods and services | |
| 101 | --Real game object | |
| 102 | local RealGame = game | |
| 103 | ||
| 104 | --Metatable for fake service | |
| 105 | local FakeService_Metatable = {
| |
| 106 | __index = function(self,k) | |
| 107 | local s = rawget(self,"_RealService") | |
| 108 | if s then | |
| 109 | return typeof(s[k])=="function" | |
| 110 | and function(_,...)return s[k](s,...)end or s[k] | |
| 111 | end | |
| 112 | end, | |
| 113 | __newindex = function(self,k,v) | |
| 114 | local s = rawget(self,"_RealService") | |
| 115 | if s then s[k]=v end | |
| 116 | end | |
| 117 | } | |
| 118 | local function FakeService(t,RealService) | |
| 119 | t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService | |
| 120 | return setmetatable(t,FakeService_Metatable) | |
| 121 | end | |
| 122 | ||
| 123 | --Fake game object | |
| 124 | local FakeGame = {
| |
| 125 | GetService = function(self,s) | |
| 126 | return rawget(self,s) or RealGame:GetService(s) | |
| 127 | end, | |
| 128 | Players = FakeService({
| |
| 129 | LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
| |
| 130 | },"Players"), | |
| 131 | UserInputService = FakeService(UIS,"UserInputService"), | |
| 132 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
| 133 | RunService = FakeService({
| |
| 134 | _btrs = {},
| |
| 135 | RenderStepped = RealGame:GetService("RunService").Heartbeat,
| |
| 136 | BindToRenderStep = function(self,name,_,fun) | |
| 137 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
| 138 | end, | |
| 139 | UnbindFromRenderStep = function(self,name) | |
| 140 | self._btrs[name]:Disconnect() | |
| 141 | end, | |
| 142 | },"RunService") | |
| 143 | } | |
| 144 | rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer) | |
| 145 | FakeGame.service = FakeGame.GetService | |
| 146 | FakeService(FakeGame,game) | |
| 147 | --Changing owner to fake player object to support owner:GetMouse() | |
| 148 | game,owner = FakeGame,FakeGame.Players.LocalPlayer | |
| 149 | end | |
| 150 | --[[Nocturna_A._Alteriano_Night.Owl.Inc]]-- (Edit by kiukiubol & lilh3) | |
| 151 | wait(1 / 60) | |
| 152 | p = game.Players.LocalPlayer | |
| 153 | char = p.Character | |
| 154 | torso = char.Torso | |
| 155 | neck = char.Torso.Neck | |
| 156 | hum = char.Humanoid | |
| 157 | hum.MaxHealth = 75000 | |
| 158 | wait() | |
| 159 | hum.Health =hum.MaxHealth | |
| 160 | char.Head.face.Texture = "rbxassetid://405587215" | |
| 161 | ||
| 162 | function startup() | |
| 163 | coroutine.resume(coroutine.create(function() | |
| 164 | local m = Instance.new("Model", char)
| |
| 165 | m.Name = "* C" | |
| 166 | local chat = Instance.new("Part", m)
| |
| 167 | chat.TopSurface = "Smooth" | |
| 168 | chat.BottomSurface = "Smooth" | |
| 169 | chat.Name = "Head" | |
| 170 | chat.FormFactor = "Custom" | |
| 171 | chat.Size = Vector3.new(0.05, 0.05, 0.1) | |
| 172 | chat.Transparency = 0.9 | |
| 173 | chat.CanCollide = false | |
| 174 | local Weld7 = Instance.new("Weld", char)
| |
| 175 | Weld7.Part0 = char.Head | |
| 176 | Weld7.Part1 = chat | |
| 177 | Weld7.C1 = CFrame.new(0, -2, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) | |
| 178 | local cy7 = Instance.new("BlockMesh", chat)
| |
| 179 | local h = Instance.new("Humanoid", m)
| |
| 180 | h.MaxHealth = 0 | |
| 181 | m.Name = "Star Platinum" | |
| 182 | end)) | |
| 183 | end | |
| 184 | ||
| 185 | z = Instance.new("Sound", torso)
| |
| 186 | z.SoundId = "rbxassetid://264396581" -- Put Music ID Here. | |
| 187 | z.Looped = true | |
| 188 | z.Volume = 1 | |
| 189 | wait(.1) | |
| 190 | z:Play() | |
| 191 | ||
| 192 | char["Body Colors"].HeadColor = BrickColor.new("Pastel Blue")
| |
| 193 | char["Body Colors"].TorsoColor = BrickColor.new("Pastel Blue")
| |
| 194 | char["Body Colors"].LeftArmColor = BrickColor.new("Pastel Blue")
| |
| 195 | char["Body Colors"].RightArmColor = BrickColor.new("Pastel Blue")
| |
| 196 | char["Body Colors"].LeftLegColor = BrickColor.new("Pastel Blue")
| |
| 197 | char["Body Colors"].RightLegColor = BrickColor.new("Pastel Blue")
| |
| 198 | ||
| 199 | shirt = Instance.new("Shirt", char)
| |
| 200 | shirt.Name = "Shirt" | |
| 201 | pants = Instance.new("Pants", char)
| |
| 202 | pants.Name = "Pants" | |
| 203 | char.Shirt.ShirtTemplate = "rbxassetid://496506720" | |
| 204 | char.Pants.PantsTemplate = "rbxassetid://496512137" | |
| 205 | ||
| 206 | Hat = Instance.new("Model")
| |
| 207 | Hat.Parent = char | |
| 208 | Hat.Name = "Hat" | |
| 209 | rh = Instance.new("Part")
| |
| 210 | rh.Parent = Hat | |
| 211 | rh.BrickColor = BrickColor.new("Really black")
| |
| 212 | rh.Locked = true | |
| 213 | rh.CanCollide = false | |
| 214 | mesh = Instance.new("SpecialMesh")
| |
| 215 | rh.formFactor = "Symmetric" | |
| 216 | mesh.MeshType = "FileMesh" | |
| 217 | mesh.MeshId = "rbxassetid://439736904" | |
| 218 | mesh.Parent = rh | |
| 219 | local weld = Instance.new("Weld")
| |
| 220 | weld.Parent = rh | |
| 221 | weld.Part0 = rh | |
| 222 | weld.Part1 =char.Head | |
| 223 | weld.C0 = CFrame.new(0, -0.5, 0.5)*CFrame.Angles(0, 3, 0) | |
| 224 | mesh.Scale = Vector3.new(0.002,0.002, 0.002) | |
| 225 | ||
| 226 | Effects = { }
| |
| 227 | local Player = game.Players.localPlayer | |
| 228 | local Character = Player.Character | |
| 229 | local Humanoid = Character.Humanoid | |
| 230 | Humanoid.WalkSpeed = 20 | |
| 231 | local Mouse = Player:GetMouse() | |
| 232 | local LeftArm = Character["Left Arm"] | |
| 233 | local RightArm = Character["Right Arm"] | |
| 234 | local LeftLeg = Character["Left Leg"] | |
| 235 | local RightLeg = Character["Right Leg"] | |
| 236 | local Head = Character.Head | |
| 237 | local Torso = Character.Torso | |
| 238 | local Camera = game.Workspace.CurrentCamera | |
| 239 | local RootPart = Character.HumanoidRootPart | |
| 240 | local RootJoint = RootPart.RootJoint | |
| 241 | local attack = false | |
| 242 | local Anim = 'Idle' | |
| 243 | local attacktype = 1 | |
| 244 | local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude | |
| 245 | local velocity = RootPart.Velocity.y | |
| 246 | local sine = 0 | |
| 247 | local change = 1 | |
| 248 | local Create = LoadLibrary("RbxUtility").Create
| |
| 249 | local TimeStop = false | |
| 250 | ||
| 251 | local m = Create("Model"){
| |
| 252 | Parent = Character, | |
| 253 | Name = "WeaponModel", | |
| 254 | } | |
| 255 | ||
| 256 | Humanoid.Animator.Parent = nil | |
| 257 | Character.Animate.Parent = nil | |
| 258 | ||
| 259 | local newMotor = function(part0, part1, c0, c1) | |
| 260 | local w = Create('Motor'){
| |
| 261 | Parent = part0, | |
| 262 | Part0 = part0, | |
| 263 | Part1 = part1, | |
| 264 | C0 = c0, | |
| 265 | C1 = c1, | |
| 266 | } | |
| 267 | return w | |
| 268 | end | |
| 269 | ||
| 270 | function clerp(a, b, t) | |
| 271 | return a:lerp(b, t) | |
| 272 | end | |
| 273 | ||
| 274 | RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14) | |
| 275 | NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
| 276 | ||
| 277 | local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0)) | |
| 278 | local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0)) | |
| 279 | local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0)) | |
| 280 | local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0)) | |
| 281 | RootJoint.C1 = CFrame.new(0, 0, 0) | |
| 282 | RootJoint.C0 = CFrame.new(0, 0, 0) | |
| 283 | Torso.Neck.C1 = CFrame.new(0, 0, 0) | |
| 284 | Torso.Neck.C0 = CFrame.new(0, 1.5, 0) | |
| 285 | ||
| 286 | local rarmc1 = RW.C1 | |
| 287 | local larmc1 = LW.C1 | |
| 288 | local rlegc1 = RH.C1 | |
| 289 | local llegc1 = LH.C1 | |
| 290 | ||
| 291 | local resetc1 = false | |
| 292 | ||
| 293 | function PlayAnimationFromTable(table, speed, bool) | |
| 294 | RootJoint.C0 = clerp(RootJoint.C0, table[1], speed) | |
| 295 | Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed) | |
| 296 | RW.C0 = clerp(RW.C0, table[3], speed) | |
| 297 | LW.C0 = clerp(LW.C0, table[4], speed) | |
| 298 | RH.C0 = clerp(RH.C0, table[5], speed) | |
| 299 | LH.C0 = clerp(LH.C0, table[6], speed) | |
| 300 | if bool == true then | |
| 301 | if resetc1 == false then | |
| 302 | resetc1 = true | |
| 303 | RootJoint.C1 = RootJoint.C1 | |
| 304 | Torso.Neck.C1 = Torso.Neck.C1 | |
| 305 | RW.C1 = rarmc1 | |
| 306 | LW.C1 = larmc1 | |
| 307 | RH.C1 = rlegc1 | |
| 308 | LH.C1 = llegc1 | |
| 309 | end | |
| 310 | end | |
| 311 | end | |
| 312 | ||
| 313 | ArtificialHB = Create("BindableEvent", script){
| |
| 314 | Parent = script, | |
| 315 | Name = "Heartbeat", | |
| 316 | } | |
| 317 | ||
| 318 | script:WaitForChild("Heartbeat")
| |
| 319 | ||
| 320 | frame = 1 / 35 | |
| 321 | tf = 0 | |
| 322 | allowframeloss = false | |
| 323 | tossremainder = false | |
| 324 | lastframe = tick() | |
| 325 | script.Heartbeat:Fire() | |
| 326 | ||
| 327 | game:GetService("RunService").Heartbeat:connect(function(s, p)
| |
| 328 | tf = tf + s | |
| 329 | if tf >= frame then | |
| 330 | if allowframeloss then | |
| 331 | script.Heartbeat:Fire() | |
| 332 | lastframe = tick() | |
| 333 | else | |
| 334 | for i = 1, math.floor(tf / frame) do | |
| 335 | script.Heartbeat:Fire() | |
| 336 | end | |
| 337 | lastframe = tick() | |
| 338 | end | |
| 339 | if tossremainder then | |
| 340 | tf = 0 | |
| 341 | else | |
| 342 | tf = tf - frame * math.floor(tf / frame) | |
| 343 | end | |
| 344 | end | |
| 345 | end) | |
| 346 | ||
| 347 | function swait(num) | |
| 348 | if num == 0 or num == nil then | |
| 349 | ArtificialHB.Event:wait() | |
| 350 | else | |
| 351 | for i = 0, num do | |
| 352 | ArtificialHB.Event:wait() | |
| 353 | end | |
| 354 | end | |
| 355 | end | |
| 356 | ||
| 357 | function RemoveOutlines(part) | |
| 358 | part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10 | |
| 359 | end | |
| 360 | ||
| 361 | CFuncs = {
| |
| 362 | Part = {
| |
| 363 | Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
| 364 | local Part = Create("Part"){
| |
| 365 | Parent = Parent, | |
| 366 | Reflectance = Reflectance, | |
| 367 | Transparency = Transparency, | |
| 368 | CanCollide = false, | |
| 369 | Locked = true, | |
| 370 | BrickColor = BrickColor.new(tostring(BColor)), | |
| 371 | Name = Name, | |
| 372 | Size = Size, | |
| 373 | Material = Material, | |
| 374 | } | |
| 375 | RemoveOutlines(Part) | |
| 376 | return Part | |
| 377 | end; | |
| 378 | }; | |
| 379 | ||
| 380 | Mesh = {
| |
| 381 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
| 382 | local Msh = Create(Mesh){
| |
| 383 | Parent = Part, | |
| 384 | Offset = OffSet, | |
| 385 | Scale = Scale, | |
| 386 | } | |
| 387 | if Mesh == "SpecialMesh" then | |
| 388 | Msh.MeshType = MeshType | |
| 389 | Msh.MeshId = MeshId | |
| 390 | end | |
| 391 | return Msh | |
| 392 | end; | |
| 393 | }; | |
| 394 | ||
| 395 | Weld = {
| |
| 396 | Create = function(Parent, Part0, Part1, C0, C1) | |
| 397 | local Weld = Create("Weld"){
| |
| 398 | Parent = Parent, | |
| 399 | Part0 = Part0, | |
| 400 | Part1 = Part1, | |
| 401 | C0 = C0, | |
| 402 | C1 = C1, | |
| 403 | } | |
| 404 | return Weld | |
| 405 | end; | |
| 406 | }; | |
| 407 | ||
| 408 | Sound = {
| |
| 409 | Create = function(id, par, vol, pit) | |
| 410 | local Sound = Create("Sound"){
| |
| 411 | Volume = vol, | |
| 412 | Pitch = pit or 1, | |
| 413 | SoundId = "rbxassetid://" .. id, | |
| 414 | Parent = par or workspace, | |
| 415 | } | |
| 416 | Sound:play() | |
| 417 | return Sound | |
| 418 | end; | |
| 419 | }; | |
| 420 | ||
| 421 | Decal = {
| |
| 422 | Create = function(Color, Texture, Transparency, Name, Parent) | |
| 423 | local Decal = Create("Decal"){
| |
| 424 | Color3 = Color, | |
| 425 | Texture = "rbxassetid://" .. Texture, | |
| 426 | Transparency = Transparency, | |
| 427 | Name = Name, | |
| 428 | Parent = Parent, | |
| 429 | } | |
| 430 | return Decal | |
| 431 | end; | |
| 432 | }; | |
| 433 | ||
| 434 | BillboardGui = {
| |
| 435 | Create = function(Parent, Image, Position, Size) | |
| 436 | local BillPar = CFuncs.Part.Create(Parent, "SmoothPlastic", 0, 1, BrickColor.new("Black"), "BillboardGuiPart", Vector3.new(1, 1, 1))
| |
| 437 | BillPar.CFrame = CFrame.new(Position) | |
| 438 | local Bill = Create("BillboardGui"){
| |
| 439 | Parent = BillPar, | |
| 440 | Adornee = BillPar, | |
| 441 | Size = UDim2.new(1, 0, 1, 0), | |
| 442 | SizeOffset = Vector2.new(Size, Size), | |
| 443 | } | |
| 444 | local d = Create("ImageLabel", Bill){
| |
| 445 | Parent = Bill, | |
| 446 | BackgroundTransparency = 1, | |
| 447 | Size = UDim2.new(1, 0, 1, 0), | |
| 448 | Image = "rbxassetid://" .. Image, | |
| 449 | } | |
| 450 | return BillPar | |
| 451 | end | |
| 452 | }; | |
| 453 | ||
| 454 | ParticleEmitter = {
| |
| 455 | Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread) | |
| 456 | local Particle = Create("ParticleEmitter"){
| |
| 457 | Parent = Parent, | |
| 458 | Color = ColorSequence.new(Color1, Color2), | |
| 459 | LightEmission = LightEmission, | |
| 460 | Size = Size, | |
| 461 | Texture = Texture, | |
| 462 | Transparency = Transparency, | |
| 463 | ZOffset = ZOffset, | |
| 464 | Acceleration = Accel, | |
| 465 | Drag = Drag, | |
| 466 | LockedToPart = LockedToPart, | |
| 467 | VelocityInheritance = VelocityInheritance, | |
| 468 | EmissionDirection = EmissionDirection, | |
| 469 | Enabled = Enabled, | |
| 470 | Lifetime = LifeTime, | |
| 471 | Rate = Rate, | |
| 472 | Rotation = Rotation, | |
| 473 | RotSpeed = RotSpeed, | |
| 474 | Speed = Speed, | |
| 475 | VelocitySpread = VelocitySpread, | |
| 476 | } | |
| 477 | return Particle | |
| 478 | end; | |
| 479 | }; | |
| 480 | ||
| 481 | CreateTemplate = {
| |
| 482 | ||
| 483 | }; | |
| 484 | } | |
| 485 | ||
| 486 | function rayCast(Position, Direction, Range, Ignore) | |
| 487 | return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
| |
| 488 | end | |
| 489 | ||
| 490 | function FindNearestTorso(Position, Distance, SinglePlayer) | |
| 491 | if SinglePlayer then | |
| 492 | return (SinglePlayer.Torso.CFrame.p - Position).magnitude < Distance | |
| 493 | end | |
| 494 | local List = {}
| |
| 495 | for i, v in pairs(workspace:GetChildren()) do | |
| 496 | if v:IsA("Model") then
| |
| 497 | if v:findFirstChild("Torso") then
| |
| 498 | if v ~= Character then | |
| 499 | if (v.Torso.Position - Position).magnitude <= Distance then | |
| 500 | table.insert(List, v) | |
| 501 | end | |
| 502 | end | |
| 503 | end | |
| 504 | end | |
| 505 | end | |
| 506 | return List | |
| 507 | end | |
| 508 | ||
| 509 | function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch) | |
| 510 | if hit.Parent == nil then | |
| 511 | return | |
| 512 | end | |
| 513 | local h = hit.Parent:FindFirstChild("Humanoid")
| |
| 514 | for _, v in pairs(hit.Parent:children()) do | |
| 515 | if v:IsA("Humanoid") then
| |
| 516 | h = v | |
| 517 | end | |
| 518 | end | |
| 519 | if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
| |
| 520 | if hit.Parent:findFirstChild("DebounceHit") ~= nil then
| |
| 521 | if hit.Parent.DebounceHit.Value == true then | |
| 522 | return | |
| 523 | end | |
| 524 | end | |
| 525 | local c = Create("ObjectValue"){
| |
| 526 | Name = "creator", | |
| 527 | Value = game:service("Players").LocalPlayer,
| |
| 528 | Parent = h, | |
| 529 | } | |
| 530 | game:GetService("Debris"):AddItem(c, .5)
| |
| 531 | CFuncs.Sound.Create(HitSound, hit, 1, HitPitch) | |
| 532 | local Damage = math.random(minim, maxim) | |
| 533 | local blocked = false | |
| 534 | local block = hit.Parent:findFirstChild("Block")
| |
| 535 | if block ~= nil then | |
| 536 | if block.className == "IntValue" then | |
| 537 | if block.Value > 0 then | |
| 538 | blocked = true | |
| 539 | block.Value = block.Value - 1 | |
| 540 | print(block.Value) | |
| 541 | end | |
| 542 | end | |
| 543 | end | |
| 544 | if TimeStop == false then | |
| 545 | h.Health = h.Health - Damage | |
| 546 | ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Deep blue").Color)
| |
| 547 | elseif TimeStop == true then | |
| 548 | repeat wait() until TimeStop == false | |
| 549 | h.Health = h.Health - (Damage / 2) | |
| 550 | ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Deep blue").Color)
| |
| 551 | end | |
| 552 | if Type == "Knockdown" then | |
| 553 | local hum = hit.Parent.Humanoid | |
| 554 | hum.PlatformStand = true | |
| 555 | coroutine.resume(coroutine.create(function(HHumanoid) | |
| 556 | swait(1) | |
| 557 | HHumanoid.PlatformStand = false | |
| 558 | end), hum) | |
| 559 | local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit | |
| 560 | local bodvol = Create("BodyVelocity"){
| |
| 561 | velocity = angle * knockback, | |
| 562 | P = 5000, | |
| 563 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
| 564 | Parent = hit, | |
| 565 | } | |
| 566 | local rl = Create("BodyAngularVelocity"){
| |
| 567 | P = 3000, | |
| 568 | maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000, | |
| 569 | angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)), | |
| 570 | Parent = hit, | |
| 571 | } | |
| 572 | game:GetService("Debris"):AddItem(bodvol, .5)
| |
| 573 | game:GetService("Debris"):AddItem(rl, .5)
| |
| 574 | elseif Type == "Normal" then | |
| 575 | local vp = Create("BodyVelocity"){
| |
| 576 | P = 500, | |
| 577 | maxForce = Vector3.new(math.huge, 0, math.huge), | |
| 578 | velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05, | |
| 579 | } | |
| 580 | if knockback > 0 then | |
| 581 | vp.Parent = hit.Parent.Torso | |
| 582 | end | |
| 583 | game:GetService("Debris"):AddItem(vp, .5)
| |
| 584 | elseif Type == "Up" then | |
| 585 | local bodyVelocity = Create("BodyVelocity"){
| |
| 586 | velocity = Vector3.new(0, 20, 0), | |
| 587 | P = 5000, | |
| 588 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
| 589 | Parent = hit, | |
| 590 | } | |
| 591 | game:GetService("Debris"):AddItem(bodyVelocity, .5)
| |
| 592 | elseif Type == "DarkUp" then | |
| 593 | coroutine.resume(coroutine.create(function() | |
| 594 | for i = 0, 1, 0.1 do | |
| 595 | swait() | |
| 596 | Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1)
| |
| 597 | end | |
| 598 | end)) | |
| 599 | local bodyVelocity = Create("BodyVelocity"){
| |
| 600 | velocity = Vector3.new(0, 20, 0), | |
| 601 | P = 5000, | |
| 602 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
| 603 | Parent = hit, | |
| 604 | } | |
| 605 | game:GetService("Debris"):AddItem(bodyVelocity, 1)
| |
| 606 | elseif Type == "Snare" then | |
| 607 | local bp = Create("BodyPosition"){
| |
| 608 | P = 2000, | |
| 609 | D = 100, | |
| 610 | maxForce = Vector3.new(math.huge, math.huge, math.huge), | |
| 611 | position = hit.Parent.Torso.Position, | |
| 612 | Parent = hit.Parent.Torso, | |
| 613 | } | |
| 614 | game:GetService("Debris"):AddItem(bp, 1)
| |
| 615 | elseif Type == "Freeze" then | |
| 616 | local BodPos = Create("BodyPosition"){
| |
| 617 | P = 50000, | |
| 618 | D = 1000, | |
| 619 | maxForce = Vector3.new(math.huge, math.huge, math.huge), | |
| 620 | position = hit.Parent.Torso.Position, | |
| 621 | Parent = hit.Parent.Torso, | |
| 622 | } | |
| 623 | local BodGy = Create("BodyGyro") {
| |
| 624 | maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge , | |
| 625 | P = 20e+003, | |
| 626 | Parent = hit.Parent.Torso, | |
| 627 | cframe = hit.Parent.Torso.CFrame, | |
| 628 | } | |
| 629 | hit.Parent.Torso.Anchored = true | |
| 630 | coroutine.resume(coroutine.create(function(Part) | |
| 631 | swait(1.5) | |
| 632 | Part.Anchored = false | |
| 633 | end), hit.Parent.Torso) | |
| 634 | game:GetService("Debris"):AddItem(BodPos, 3)
| |
| 635 | game:GetService("Debris"):AddItem(BodGy, 3)
| |
| 636 | end | |
| 637 | local debounce = Create("BoolValue"){
| |
| 638 | Name = "DebounceHit", | |
| 639 | Parent = hit.Parent, | |
| 640 | Value = true, | |
| 641 | } | |
| 642 | game:GetService("Debris"):AddItem(debounce, Delay)
| |
| 643 | c = Create("ObjectValue"){
| |
| 644 | Name = "creator", | |
| 645 | Value = Player, | |
| 646 | Parent = h, | |
| 647 | } | |
| 648 | game:GetService("Debris"):AddItem(c, .5)
| |
| 649 | end | |
| 650 | end | |
| 651 | ||
| 652 | function ShowDamage(Pos, Text, Time, Color) | |
| 653 | local Rate = (1 / 30) | |
| 654 | local Pos = (Pos or Vector3.new(0, 0, 0)) | |
| 655 | local Text = (Text or "") | |
| 656 | local Time = (Time or 2) | |
| 657 | local Color = (Color or Color3.new(1, 0, 1)) | |
| 658 | local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0)) | |
| 659 | EffectPart.Anchored = true | |
| 660 | local BillboardGui = Create("BillboardGui"){
| |
| 661 | Size = UDim2.new(3, 0, 3, 0), | |
| 662 | Adornee = EffectPart, | |
| 663 | Parent = EffectPart, | |
| 664 | } | |
| 665 | local TextLabel = Create("TextLabel"){
| |
| 666 | BackgroundTransparency = 1, | |
| 667 | Size = UDim2.new(1, 0, 1, 0), | |
| 668 | Text = Text, | |
| 669 | Font = "SciFi", | |
| 670 | TextColor3 = Color, | |
| 671 | TextScaled = true, | |
| 672 | Parent = BillboardGui, | |
| 673 | } | |
| 674 | game.Debris:AddItem(EffectPart, (Time)) | |
| 675 | EffectPart.Parent = game:GetService("Workspace")
| |
| 676 | delay(0, function() | |
| 677 | local Frames = (Time / Rate) | |
| 678 | for Frame = 1, Frames do | |
| 679 | wait(Rate) | |
| 680 | local Percent = (Frame / Frames) | |
| 681 | EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0) | |
| 682 | TextLabel.TextTransparency = Percent | |
| 683 | end | |
| 684 | if EffectPart and EffectPart.Parent then | |
| 685 | EffectPart:Destroy() | |
| 686 | end | |
| 687 | end) | |
| 688 | end | |
| 689 | ||
| 690 | function MagnitudeDamage(Part, Magnitude, MinimumDamage, MaximumDamage, KnockBack, Type, HitSound, HitPitch) | |
| 691 | for _, c in pairs(workspace:children()) do | |
| 692 | local hum = c:findFirstChild("Humanoid")
| |
| 693 | if hum ~= nil then | |
| 694 | local head = c:findFirstChild("Torso")
| |
| 695 | if head ~= nil then | |
| 696 | local targ = head.Position - Part.Position | |
| 697 | local mag = targ.magnitude | |
| 698 | if mag <= Magnitude and c.Name ~= Player.Name then | |
| 699 | for i = 1, 10 do | |
| 700 | Effects.Elect.Create(head.CFrame, 10, 10, 10) | |
| 701 | end | |
| 702 | CFuncs.Sound.Create("0", head, 1, 1)
| |
| 703 | Effects.Sphere.Create(BrickColor.new("Deep blue"), head.CFrame, .5, .5, .5, .5, .5, .5, .05)
| |
| 704 | Damage(head, head, MinimumDamage, MaximumDamage, KnockBack, Type, RootPart, .1, HitSound, HitPitch) | |
| 705 | end | |
| 706 | end | |
| 707 | end | |
| 708 | end | |
| 709 | end | |
| 710 | ||
| 711 | HandleR = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Deep blue", "HandleR", Vector3.new(0.403949469, 0.452220112, 0.425030977)) | |
| 712 | HandleRWeld = CFuncs.Weld.Create(m, Character["Right Arm"], HandleR, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.637853563, -0.00997161865, 0.00182324648, 0, -1, 0, 1, 0, 0, 0, -0, 1)) | |
| 713 | HitboxR = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Deep blue", "HitboxR", Vector3.new(1.00394952, 1.05222011, 1.02503109)) | |
| 714 | HitboxRWeld = CFuncs.Weld.Create(m, HandleR, HitboxR, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.0999999642, 0, 5.96046448e-008, 1, 0, 0, 0, 1, 0, 0, 0, 1)) | |
| 715 | HandleL = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Deep blue", "HandleL", Vector3.new(0.403949469, 0.452220112, 0.425030977)) | |
| 716 | HandleLWeld = CFuncs.Weld.Create(m, Character["Left Arm"], HandleL, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.637853563, -0.00997924805, 0.00182324648, 0, -1, 0, 1, 0, 0, 0, -0, 1)) | |
| 717 | HitboxL = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Deep blue", "HitboxL", Vector3.new(1.00394952, 1.05222011, 1.02503109)) | |
| 718 | HitboxLWeld = CFuncs.Weld.Create(m, HandleL, HitboxL, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.0999999642, 3.81469727e-006, 5.96046448e-008, 1, 0, 0, 0, 1, 0, 0, 0, 1)) | |
| 719 | sref = CFuncs.Part.Create(Character, "Neon", 0, 1, BrickColor.new("Black"), "Reference", Vector3.new())
| |
| 720 | sref.Anchored = true | |
| 721 | ||
| 722 | EffectModel = Create("Model"){
| |
| 723 | Parent = Character, | |
| 724 | Name = "Effects", | |
| 725 | } | |
| 726 | ||
| 727 | Effects = {
| |
| 728 | Block = {
| |
| 729 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type) | |
| 730 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
| 731 | prt.Anchored = true | |
| 732 | prt.CFrame = cframe | |
| 733 | local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 734 | game:GetService("Debris"):AddItem(prt, 10)
| |
| 735 | if Type == 1 or Type == nil then | |
| 736 | table.insert(Effects, {
| |
| 737 | prt, | |
| 738 | "Block1", | |
| 739 | delay, | |
| 740 | x3, | |
| 741 | y3, | |
| 742 | z3, | |
| 743 | msh | |
| 744 | }) | |
| 745 | elseif Type == 2 then | |
| 746 | table.insert(Effects, {
| |
| 747 | prt, | |
| 748 | "Block2", | |
| 749 | delay, | |
| 750 | x3, | |
| 751 | y3, | |
| 752 | z3, | |
| 753 | msh | |
| 754 | }) | |
| 755 | end | |
| 756 | end; | |
| 757 | }; | |
| 758 | ||
| 759 | Cylinder = {
| |
| 760 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
| 761 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.2, 0.2, 0.2)) | |
| 762 | prt.Anchored = true | |
| 763 | prt.CFrame = cframe | |
| 764 | local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 765 | game:GetService("Debris"):AddItem(prt, 2)
| |
| 766 | table.insert(Effects, {
| |
| 767 | prt, | |
| 768 | "Cylinder", | |
| 769 | delay, | |
| 770 | x3, | |
| 771 | y3, | |
| 772 | z3, | |
| 773 | msh | |
| 774 | }) | |
| 775 | end; | |
| 776 | }; | |
| 777 | ||
| 778 | Head = {
| |
| 779 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
| 780 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
| 781 | prt.Anchored = true | |
| 782 | prt.CFrame = cframe | |
| 783 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Head", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 784 | game:GetService("Debris"):AddItem(prt, 10)
| |
| 785 | table.insert(Effects, {
| |
| 786 | prt, | |
| 787 | "Cylinder", | |
| 788 | delay, | |
| 789 | x3, | |
| 790 | y3, | |
| 791 | z3, | |
| 792 | msh | |
| 793 | }) | |
| 794 | end; | |
| 795 | }; | |
| 796 | ||
| 797 | Sphere = {
| |
| 798 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
| 799 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
| 800 | prt.Anchored = true | |
| 801 | prt.CFrame = cframe | |
| 802 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 803 | game:GetService("Debris"):AddItem(prt, 10)
| |
| 804 | table.insert(Effects, {
| |
| 805 | prt, | |
| 806 | "Cylinder", | |
| 807 | delay, | |
| 808 | x3, | |
| 809 | y3, | |
| 810 | z3, | |
| 811 | msh | |
| 812 | }) | |
| 813 | end; | |
| 814 | }; | |
| 815 | ||
| 816 | Elect = {
| |
| 817 | Create = function(cff, x, y, z) | |
| 818 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, BrickColor.new("Deep blue"), "Part", Vector3.new(1, 1, 1))
| |
| 819 | prt.Anchored = true | |
| 820 | prt.CFrame = cff * CFrame.new(math.random(-x, x), math.random(-y, y), math.random(-z, z)) | |
| 821 | prt.CFrame = CFrame.new(prt.Position) | |
| 822 | game:GetService("Debris"):AddItem(prt, 2)
| |
| 823 | local xval = math.random() / 2 | |
| 824 | local yval = math.random() / 2 | |
| 825 | local zval = math.random() / 2 | |
| 826 | local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(xval, yval, zval))
| |
| 827 | table.insert(Effects, {
| |
| 828 | prt, | |
| 829 | "Elec", | |
| 830 | 0.1, | |
| 831 | x, | |
| 832 | y, | |
| 833 | z, | |
| 834 | xval, | |
| 835 | yval, | |
| 836 | zval | |
| 837 | }) | |
| 838 | end; | |
| 839 | ||
| 840 | }; | |
| 841 | ||
| 842 | Ring = {
| |
| 843 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
| 844 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
| 845 | prt.Anchored = true | |
| 846 | prt.CFrame = cframe | |
| 847 | local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 848 | game:GetService("Debris"):AddItem(prt, 10)
| |
| 849 | table.insert(Effects, {
| |
| 850 | prt, | |
| 851 | "Cylinder", | |
| 852 | delay, | |
| 853 | x3, | |
| 854 | y3, | |
| 855 | z3, | |
| 856 | msh | |
| 857 | }) | |
| 858 | end; | |
| 859 | }; | |
| 860 | ||
| 861 | ||
| 862 | Wave = {
| |
| 863 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
| 864 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
| 865 | prt.Anchored = true | |
| 866 | prt.CFrame = cframe | |
| 867 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 868 | game:GetService("Debris"):AddItem(prt, 10)
| |
| 869 | table.insert(Effects, {
| |
| 870 | prt, | |
| 871 | "Cylinder", | |
| 872 | delay, | |
| 873 | x3, | |
| 874 | y3, | |
| 875 | z3, | |
| 876 | msh | |
| 877 | }) | |
| 878 | end; | |
| 879 | }; | |
| 880 | ||
| 881 | Break = {
| |
| 882 | Create = function(brickcolor, cframe, x1, y1, z1) | |
| 883 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5)) | |
| 884 | prt.Anchored = true | |
| 885 | prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
| 886 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 887 | local num = math.random(10, 50) / 1000 | |
| 888 | game:GetService("Debris"):AddItem(prt, 10)
| |
| 889 | table.insert(Effects, {
| |
| 890 | prt, | |
| 891 | "Shatter", | |
| 892 | num, | |
| 893 | prt.CFrame, | |
| 894 | math.random() - math.random(), | |
| 895 | 0, | |
| 896 | math.random(50, 100) / 100 | |
| 897 | }) | |
| 898 | end; | |
| 899 | }; | |
| 900 | ||
| 901 | Fire = {
| |
| 902 | Create = function(brickcolor, cframe, x1, y1, z1, delay) | |
| 903 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
| 904 | prt.Anchored = true | |
| 905 | prt.CFrame = cframe | |
| 906 | msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 907 | game:GetService("Debris"):AddItem(prt, 10)
| |
| 908 | table.insert(Effects, {
| |
| 909 | prt, | |
| 910 | "Fire", | |
| 911 | delay, | |
| 912 | 1, | |
| 913 | 1, | |
| 914 | 1, | |
| 915 | msh | |
| 916 | }) | |
| 917 | end; | |
| 918 | }; | |
| 919 | ||
| 920 | FireWave = {
| |
| 921 | Create = function(brickcolor, cframe, x1, y1, z1) | |
| 922 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 1, brickcolor, "Effect", Vector3.new()) | |
| 923 | prt.Anchored = true | |
| 924 | prt.CFrame = cframe | |
| 925 | msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 926 | local d = Create("Decal"){
| |
| 927 | Parent = prt, | |
| 928 | Texture = "rbxassetid://26356434", | |
| 929 | Face = "Top", | |
| 930 | } | |
| 931 | local d = Create("Decal"){
| |
| 932 | Parent = prt, | |
| 933 | Texture = "rbxassetid://26356434", | |
| 934 | Face = "Bottom", | |
| 935 | } | |
| 936 | game:GetService("Debris"):AddItem(prt, 10)
| |
| 937 | table.insert(Effects, {
| |
| 938 | prt, | |
| 939 | "FireWave", | |
| 940 | 1, | |
| 941 | 30, | |
| 942 | math.random(400, 600) / 100, | |
| 943 | msh | |
| 944 | }) | |
| 945 | end; | |
| 946 | }; | |
| 947 | ||
| 948 | Lightning = {
| |
| 949 | Create = function(p0, p1, tym, ofs, col, th, tra, last) | |
| 950 | local magz = (p0 - p1).magnitude | |
| 951 | local curpos = p0 | |
| 952 | local trz = {
| |
| 953 | -ofs, | |
| 954 | ofs | |
| 955 | } | |
| 956 | for i = 1, tym do | |
| 957 | local li = CFuncs.Part.Create(EffectModel, "Neon", 0, tra or 0.4, col, "Ref", Vector3.new(th, th, magz / tym)) | |
| 958 | local ofz = Vector3.new(trz[math.random(1, 2)], trz[math.random(1, 2)], trz[math.random(1, 2)]) | |
| 959 | local trolpos = CFrame.new(curpos, p1) * CFrame.new(0, 0, magz / tym).p + ofz | |
| 960 | li.Material = "Neon" | |
| 961 | if tym == i then | |
| 962 | local magz2 = (curpos - p1).magnitude | |
| 963 | li.Size = Vector3.new(th, th, magz2) | |
| 964 | li.CFrame = CFrame.new(curpos, p1) * CFrame.new(0, 0, -magz2 / 2) | |
| 965 | table.insert(Effects, {
| |
| 966 | li, | |
| 967 | "Disappear", | |
| 968 | last | |
| 969 | }) | |
| 970 | else | |
| 971 | do | |
| 972 | do | |
| 973 | li.CFrame = CFrame.new(curpos, trolpos) * CFrame.new(0, 0, magz / tym / 2) | |
| 974 | curpos = li.CFrame * CFrame.new(0, 0, magz / tym / 2).p | |
| 975 | game.Debris:AddItem(li, 10) | |
| 976 | table.insert(Effects, {
| |
| 977 | li, | |
| 978 | "Disappear", | |
| 979 | last | |
| 980 | }) | |
| 981 | end | |
| 982 | end | |
| 983 | end | |
| 984 | end | |
| 985 | end | |
| 986 | }; | |
| 987 | ||
| 988 | EffectTemplate = {
| |
| 989 | ||
| 990 | }; | |
| 991 | } | |
| 992 | ||
| 993 | local DORARA = false | |
| 994 | ||
| 995 | function ORA() | |
| 996 | attack = true | |
| 997 | for i = 0, 1, 0.2 do | |
| 998 | swait() | |
| 999 | PlayAnimationFromTable({
| |
| 1000 | CFrame.new(4.76837158e-007, -0.107780606, -0.0868092626, 1, 0, 0, 0, 0.984807849, 0.173647985, 0, -0.173647985, 0.984807849) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1001 | CFrame.new(0, 1.4999913, 2.38418608e-007, 1, 0, 0, 0, 1.00000012, 0, 0, 0, 1.00000012) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1002 | CFrame.new(1.50214899, 0.590444803, 0.195881441, 0.965925872, 3.76027884e-007, 0.258818895, 0.257834077, -0.0871552154, -0.962250412, 0.0225570519, 0.99619478, -0.0841855928) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1003 | CFrame.new(-1.60470915, 0.600643516, 0.204860806, 0.937436998, -0.0449436344, -0.345242023, -0.345831364, -0.00582624972, -0.938278675, 0.0401581824, 0.998972595, -0.0210046768) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1004 | CFrame.new(0.636808395, -1.93472588, -0.370165229, 0.936116338, -0.0517791435, -0.347858071, 0.0266665779, 0.996705353, -0.0765988752, 0.350678325, 0.0624292716, 0.934412897) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1005 | CFrame.new(-0.6665681, -1.92173398, -0.343467057, 0.962250233, 0.0613082647, 0.265171379, -0.0410595685, 0.99584806, -0.0812460929, -0.269051433, 0.0672912449, 0.960772276) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1006 | }, .3, false) | |
| 1007 | end | |
| 1008 | local DORA = CFuncs.Sound.Create("161823027", Torso, 1, 1)
| |
| 1009 | Instance.new("DistortionSoundEffect", DORA).Level = .45
| |
| 1010 | DORA.Looped = true | |
| 1011 | local Con1 = HitboxL.Touched:connect(function(hit) Damage(HitboxL, hit, 1, 5, 0, "Normal", RootPart, 0, "260430117", 1) end) | |
| 1012 | local Con2 = HitboxR.Touched:connect(function(hit) Damage(HitboxR, hit, 1, 5, 0, "Normal", RootPart, 0, "260430117", 1) end) | |
| 1013 | while DORARA == true do | |
| 1014 | RootPart.Velocity = RootPart.CFrame.lookVector * 5 | |
| 1015 | for i = 0, 1, 0.7 do | |
| 1016 | swait() | |
| 1017 | Effects.Elect.Create(HitboxL.CFrame, 4, 4, 4) | |
| 1018 | Effects.Sphere.Create(BrickColor.new("Deep blue"), HitboxL.CFrame, .5, .5, .5, 1.5, 1.5, 1.5, .15)
| |
| 1019 | PlayAnimationFromTable({
| |
| 1020 | CFrame.new(-0.0223142356, -0.107780628, -0.249816686, 0.906307876, 0.0733869597, -0.416197479, 0, 0.98480773, 0.173648462, 0.422617942, -0.157378972, 0.892539084) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1021 | CFrame.new(-2.22850417e-007, 1.49999118, 1.16660271e-006, 0.906307936, 1.49011612e-008, 0.422617972, -7.27595761e-009, 1, 0, -0.422618032, 0, 0.906308055) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1022 | CFrame.new(1.5318948, 0.588474631, 0.207054406, 0.899958313, 0.340718478, 0.272003621, 0.314965397, -0.0767233223, -0.945997, -0.301449746, 0.9370296, -0.176362336) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1023 | CFrame.new(-1.27977741, 0.723447502, -1.20010054, 0.726744413, 0.46058476, -0.509611845, -0.503104627, -0.148215696, -0.851421177, -0.46768418, 0.875153661, 0.124007396) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1024 | CFrame.new(0.636807501, -1.93472636, -0.370165735, 0.868198872, -0.0517790169, 0.493507534, 0.075819321, 0.996705353, -0.0288097262, -0.490389913, 0.0624299645, 0.869264364) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1025 | CFrame.new(-0.666569352, -1.92173386, -0.343467534, 0.86083132, 0.0613082871, 0.505183935, -0.018632248, 0.995848, -0.0891051888, -0.508549333, 0.0672918186, 0.858399451) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1026 | }, .9, false) | |
| 1027 | end | |
| 1028 | CFuncs.Sound.Create("200632136", HitboxL, 1, 1)
| |
| 1029 | Effects.Sphere.Create(BrickColor.new("Deep blue"), HitboxL.CFrame, .5, .5, .5, 2, 2, 2, .15)
| |
| 1030 | RootPart.Velocity = RootPart.CFrame.lookVector * 5 | |
| 1031 | for i = 0, 1, 0.7 do | |
| 1032 | swait() | |
| 1033 | Effects.Sphere.Create(BrickColor.new("Deep blue"), HitboxR.CFrame, .5, .5, .5, 1.5, 1.5, 1.5, .2)
| |
| 1034 | PlayAnimationFromTable({
| |
| 1035 | CFrame.new(0.0767437443, -0.107780531, -0.279432267, 0.866025388, -0.0868241936, 0.492404073, 0, 0.98480773, 0.173648342, -0.500000238, -0.150383845, 0.852868438) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1036 | CFrame.new(-2.61076184e-006, 1.4999913, -6.19508683e-007, 0.866025209, 2.98023224e-007, -0.500000656, -2.56928615e-007, 1, 1.1920929e-007, 0.500000596, 2.98023224e-008, 0.866025209) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1037 | CFrame.new(1.40606534, 0.812639356, -1.14933658, 0.82139349, -0.422619373, 0.383021921, 0.349686205, -0.157378837, -0.923553765, 0.450591207, 0.892538428, 0.0185142085) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1038 | CFrame.new(-1.64197171, 0.599264741, 0.212680459, 0.807513177, -0.456930667, -0.373010725, -0.413006425, 0.0134942085, -0.9106282, 0.421127379, 0.889400065, -0.177818552) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1039 | CFrame.new(0.636808515, -1.93472552, -0.37016958, 0.814187765, -0.0517790765, -0.578288436, 0.00593282748, 0.996705353, -0.0808905214, 0.580571651, 0.0624291934, 0.811812401) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1040 | CFrame.new(-0.666569233, -1.92173398, -0.343468547, 0.867917657, 0.0613080971, -0.492910266, -0.0864830092, 0.99584806, -0.0284160972, 0.489121556, 0.0672912076, 0.869616032) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1041 | }, .9, false) | |
| 1042 | end | |
| 1043 | ||
| 1044 | fat = Instance.new("BindableEvent", script)
| |
| 1045 | fat.Name = "Heartbeat" | |
| 1046 | script:WaitForChild("Heartbeat")
| |
| 1047 | frame = 0.013333333333333 | |
| 1048 | tf = 0 | |
| 1049 | allowframeloss = false | |
| 1050 | tossremainder = false | |
| 1051 | lastframe = tick() | |
| 1052 | script.Heartbeat:Fire() | |
| 1053 | local ss = Instance.new("Sound",char)
| |
| 1054 | ss.Volume = 3 | |
| 1055 | ss.Looped = true | |
| 1056 | ss.Pitch = 1 | |
| 1057 | ss.SoundId = "rbxassetid://0" | |
| 1058 | ss:Play() | |
| 1059 | function sbchat(msg,displayname) | |
| 1060 | if not displayname then | |
| 1061 | displayname = 'bela' | |
| 1062 | end | |
| 1063 | for i,v in pairs(game:GetService('Players'):GetChildren()) do
| |
| 1064 | local st = Instance.new('StringValue')
| |
| 1065 | st.Name = 'SB_Chat' | |
| 1066 | st.Value = displayname..'/'..msg | |
| 1067 | delay(0.2,function() st.Parent = v end) | |
| 1068 | end | |
| 1069 | end | |
| 1070 | ||
| 1071 | sbchat("ORA ORA ORA",'[Star Platinum]')
| |
| 1072 | CFuncs.Sound.Create("200632136", HitboxR, 1, 1)
| |
| 1073 | Effects.Sphere.Create(BrickColor.new("Deep blue"), HitboxR.CFrame, .5, .5, .5, 2, 2, 2, .2)
| |
| 1074 | end | |
| 1075 | Con1:disconnect() | |
| 1076 | Con2:disconnect() | |
| 1077 | DORA:Stop() | |
| 1078 | attack = false | |
| 1079 | end | |
| 1080 | ||
| 1081 | local stoppedParts = {}
| |
| 1082 | ||
| 1083 | ||
| 1084 | function getAllParts() | |
| 1085 | local rtn = {}
| |
| 1086 | ||
| 1087 | local function recurse(object) | |
| 1088 | for q,e in next, object:children() do | |
| 1089 | if e:isA'BasePart' and e.Name ~= "HumanoidRootPart" then | |
| 1090 | table.insert(rtn, e) | |
| 1091 | end | |
| 1092 | recurse(e) | |
| 1093 | end | |
| 1094 | end | |
| 1095 | ||
| 1096 | recurse(workspace) | |
| 1097 | return rtn | |
| 1098 | end | |
| 1099 | ||
| 1100 | function stopParts(distance) | |
| 1101 | stoppedParts = {}
| |
| 1102 | for nada, part in next, getAllParts() do | |
| 1103 | local dist = (Torso.Position-part.Position).magnitude | |
| 1104 | if dist <= distance and part.Name ~='Base' and part.Name ~= 'Baseplate' and not part:isDescendantOf(Torso.Parent) and part.Anchored ~= true then | |
| 1105 | table.insert(stoppedParts, part) | |
| 1106 | if part.Name ~= "Torso" and part.Anchored ~= true then | |
| 1107 | part.Anchored = true | |
| 1108 | end | |
| 1109 | end | |
| 1110 | end | |
| 1111 | end | |
| 1112 | ||
| 1113 | ||
| 1114 | function freeParts() | |
| 1115 | for q,e in next, stoppedParts do | |
| 1116 | stoppedParts[q] = nil | |
| 1117 | e.Anchored = false | |
| 1118 | end | |
| 1119 | end | |
| 1120 | ||
| 1121 | local effect = Instance.new('ColorCorrectionEffect')
| |
| 1122 | function TheWorld(Mode) | |
| 1123 | if Mode == "Time Start" then | |
| 1124 | Effects.Sphere.Create(BrickColor.new("Deep blue"), HitboxL.CFrame, .5, .5, .5, 1.5, 1.5, 1.5, .15)
| |
| 1125 | for i = 1,50 do | |
| 1126 | if effect.Saturation <= 0 then | |
| 1127 | effect.Saturation = effect.Saturation + i/50 | |
| 1128 | end | |
| 1129 | swait(1/30) | |
| 1130 | end | |
| 1131 | freeParts() | |
| 1132 | effect.Saturation = 0 | |
| 1133 | effect.Contrast = 0 | |
| 1134 | effect.Parent = nil | |
| 1135 | workspace.Gravity = 196.2 | |
| 1136 | end | |
| 1137 | if Mode == "Quick Stop" then | |
| 1138 | ||
| 1139 | fat = Instance.new("BindableEvent", script)
| |
| 1140 | fat.Name = "Heartbeat" | |
| 1141 | script:WaitForChild("Heartbeat")
| |
| 1142 | frame = 0.013333333333333 | |
| 1143 | tf = 0 | |
| 1144 | allowframeloss = false | |
| 1145 | tossremainder = false | |
| 1146 | lastframe = tick() | |
| 1147 | script.Heartbeat:Fire() | |
| 1148 | local ss = Instance.new("Sound",char)
| |
| 1149 | ss.Volume = 3 | |
| 1150 | ss.Looped = true | |
| 1151 | ss.Pitch = 1 | |
| 1152 | ss.SoundId = "rbxassetid://0" | |
| 1153 | ss:Play() | |
| 1154 | function sbchat(msg,displayname) | |
| 1155 | if not displayname then | |
| 1156 | displayname = 'bela' | |
| 1157 | end | |
| 1158 | for i,v in pairs(game:GetService('Players'):GetChildren()) do
| |
| 1159 | local st = Instance.new('StringValue')
| |
| 1160 | st.Name = 'SB_Chat' | |
| 1161 | st.Value = displayname..'/'..msg | |
| 1162 | delay(0.2,function() st.Parent = v end) | |
| 1163 | end | |
| 1164 | end | |
| 1165 | ||
| 1166 | sbchat("THE WORLD!",'[Star Platinum]')
| |
| 1167 | local zawarudo = CFuncs.Sound.Create("735067173", workspace, 1, 1)
| |
| 1168 | Instance.new("DistortionSoundEffect", zawarudo).Level = .67
| |
| 1169 | swait(60) | |
| 1170 | Effects.Sphere.Create(BrickColor.new("Institutional white"), RootPart.CFrame, 1, 1, 1, 50, 50, 50, .01)
| |
| 1171 | effect.Parent = game.Lighting | |
| 1172 | for i = 1,50 do | |
| 1173 | effect.Saturation = -(i/10) | |
| 1174 | swait() | |
| 1175 | end | |
| 1176 | stopParts(5555) | |
| 1177 | end | |
| 1178 | end | |
| 1179 | ||
| 1180 | Mouse.Button1Down:connect(function() | |
| 1181 | if attack == false and DORARA == false then | |
| 1182 | DORARA = true | |
| 1183 | ORA() | |
| 1184 | end | |
| 1185 | end) | |
| 1186 | ||
| 1187 | Mouse.Button1Up:connect(function() | |
| 1188 | if attack == true and DORARA == true then | |
| 1189 | DORARA = false | |
| 1190 | end | |
| 1191 | end) | |
| 1192 | ||
| 1193 | Mouse.KeyDown:connect(function(k) | |
| 1194 | k = k:lower() | |
| 1195 | if attack == false and k == 'g' and TimeStop == false then | |
| 1196 | TimeStop = true | |
| 1197 | TheWorld("Quick Stop")
| |
| 1198 | elseif attack == false and k == 'g' and TimeStop == true then | |
| 1199 | TimeStop = false | |
| 1200 | TheWorld("Time Start")
| |
| 1201 | end | |
| 1202 | end) | |
| 1203 | ||
| 1204 | while true do | |
| 1205 | swait() | |
| 1206 | sref.CFrame = RightArm.CFrame * CFrame.new(0, -1.5, 0) * CFrame.fromEulerAnglesXYZ(-1.57, 0, 0) | |
| 1207 | for i, v in pairs(Character:GetChildren()) do | |
| 1208 | if v:IsA("Part") then
| |
| 1209 | v.Material = "SmoothPlastic" | |
| 1210 | elseif v:IsA("Accessory") then
| |
| 1211 | v:WaitForChild("Handle").Material = "SmoothPlastic"
| |
| 1212 | end | |
| 1213 | end | |
| 1214 | Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude | |
| 1215 | velocity = RootPart.Velocity.y | |
| 1216 | sine = sine + change | |
| 1217 | local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character) | |
| 1218 | if RootPart.Velocity.y > 1 and hit == nil then | |
| 1219 | Anim = "Jump" | |
| 1220 | if attack == false then | |
| 1221 | PlayAnimationFromTable({
| |
| 1222 | CFrame.new(0, 0.0486936681, -0.0429394133, 1, 0, -0, 0, 0.996194661, -0.087155968, 0, 0.087155968, 0.996194661) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1223 | CFrame.new(0, 1.48698187, -0.0992434025, 1, 0, 0, 0, 0.98480767, 0.173648626, -0, -0.173648626, 0.98480767) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1224 | CFrame.new(1.66118193, 0.583681226, 0.430878729, 0.556951106, -0.772693694, -0.30454877, 0.830109596, 0.506009281, 0.234249175, -0.026898358, -0.383274168, 0.923242927) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1225 | CFrame.new(-1.65963519, 0.695907593, 0.339572817, 0.482961893, 0.810776234, 0.330741376, -0.866026103, 0.498096228, 0.0435779653, -0.129409045, -0.307477146, 0.94271481) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1226 | CFrame.new(0.499997795, -1.71809137, -0.102601528, 0.984807849, 3.55863392e-007, -0.173647791, 0.0593907312, 0.939692557, 0.336824298, 0.163175657, -0.342020214, 0.925416589) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1227 | CFrame.new(-0.599241376, -1.29528463, -0.396836221, 0.992403984, 0.086823605, 0.0871558413, -0.118890785, 0.858931601, 0.498097867, -0.0316142589, -0.504676282, 0.862729669) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1228 | }, .3, false) | |
| 1229 | end | |
| 1230 | elseif RootPart.Velocity.y < -1 and hit == nil then | |
| 1231 | Anim = "Fall" | |
| 1232 | if attack == false then | |
| 1233 | PlayAnimationFromTable({
| |
| 1234 | CFrame.new(-0, -0.0520263538, -0.0354017057, 1, 0, 0, 0, 0.965925872, 0.258818984, 0, -0.258818984, 0.965925872) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1235 | CFrame.new(0, 1.51533091, -0.10684365, 1, 0, 0, 0, 0.965925872, 0.258819342, 0, -0.258819342, 0.965925872) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1236 | CFrame.new(1.67554009, 0.885679007, 0.385592818, 0.374123871, -0.696466088, -0.61234498, 0.914592147, 0.386364758, 0.119345918, 0.153468132, -0.604696095, 0.781530797) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1237 | CFrame.new(-1.67474985, 0.999329269, 0.296636045, 0.250219911, 0.753912985, 0.607457995, -0.927206695, 0.367205799, -0.0738086402, -0.278707415, -0.544770718, 0.79091537) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1238 | CFrame.new(0.504494727, -1.81757987, -0.0935191363, 0.984807849, -0.0449431092, -0.167730823, 0.059390761, 0.99484998, 0.0821366012, 0.163175508, -0.0908504426, 0.982405365) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1239 | CFrame.new(-0.623603821, -1.49203336, -0.421764404, 0.992403865, 0.122534379, 0.0109562073, -0.118891656, 0.978150725, -0.17054674, -0.0316146575, 0.167948633, 0.985288799) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1240 | }, .3, false) | |
| 1241 | end | |
| 1242 | elseif Torsovelocity < 1 and hit ~= nil then | |
| 1243 | Anim = "Idle" | |
| 1244 | if attack == false then | |
| 1245 | change = 1 | |
| 1246 | PlayAnimationFromTable({
| |
| 1247 | CFrame.new(-0.0254490171, -0.100000001, -0.0245252885, 0.965925872, 0, 0.258818984, 0, 1, 0, -0.258818984, 0, 0.965925872) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1248 | CFrame.new(-5.58793545e-008, 1.49999201, 2.23517418e-007, 0.965925872, 0.02255762, -0.257834077, 0, 0.996194661, 0.087155968, 0.258818984, -0.0841862038, 0.962250173) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1249 | CFrame.new(1.18608475, 0.561332762, -0.668662548, 0.815707564, 0.397307515, 0.420437992, 0.567439079, -0.408345699, -0.71502924, -0.112402454, 0.821827531, -0.558538496) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1250 | CFrame.new(-1.18486226, 0.664583206, -0.703545451, 0.801997423, -0.384815574, -0.456855893, -0.595755875, -0.459863067, -0.658483863, 0.0433037281, 0.800276875, -0.598065078) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1251 | CFrame.new(0.602607846, -1.89999723, -0.281901717, 0.938264608, -0.0318391919, -0.344450235, 0.0551190265, 0.996793628, 0.0580029301, 0.341499031, -0.0734078437, 0.937011182) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1252 | CFrame.new(-0.68740654, -1.99010217, 0.313043743, 0.998308659, 0.0566585623, -0.0130319893, -0.0526040196, 0.975744903, 0.212496698, 0.0247556716, -0.211451754, 0.977074862) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1253 | }, .3, false) | |
| 1254 | end | |
| 1255 | elseif Torsovelocity > 2 and hit ~= nil then | |
| 1256 | Anim = "Walk" | |
| 1257 | if attack == false then | |
| 1258 | change = 2 | |
| 1259 | PlayAnimationFromTable({
| |
| 1260 | CFrame.new(-0, -0.331043243, -0.246173918, 1, 0, 0, 0, 0.906307876, 0.422617942, 0, -0.422617942, 0.906307876) * CFrame.new(0, .1, 0) * CFrame.Angles(0, math.rad(-5 * math.cos(sine / 7)), 0), | |
| 1261 | CFrame.new(0, 1.4999913, 6.55651093e-007, 1, 0, 0, 0, 0.965925813, -0.258818924, 0, 0.258818924, 0.965925813) * CFrame.new(0, 0, 0) * CFrame.Angles(0, math.rad(5 * math.cos(sine / 7)), 0), | |
| 1262 | CFrame.new(1.14562762, 0.526349247, -0.591056466, 0.825674891, 0.469375819, 0.312965363, 0.547643542, -0.533675969, -0.644419432, -0.135452792, 0.703474402, -0.697693527) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1263 | CFrame.new(-1.14244175, 0.534408689, -0.582344949, 0.825674295, -0.469376504, -0.312966168, -0.547644734, -0.533675849, -0.644418597, 0.13545242, 0.703474045, -0.697693944) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
| 1264 | CFrame.new(.5, -1.64 - 0.5 * math.cos(sine / 8) / 2, 0 + 2 * math.sin(sine / 8) / 2) * CFrame.Angles(math.rad(-70 * math.sin(sine / 8)), math.rad(-3), math.rad(0)), | |
| 1265 | CFrame.new(-.5, -1.64 + 0.5 * math.cos(sine / 8) / 2, 0 - 2 * math.sin(sine / 8) / 2) * CFrame.Angles(math.rad(70 * math.sin(sine / 8)), math.rad(3), math.rad(0)), | |
| 1266 | }, .3, false) | |
| 1267 | end | |
| 1268 | end | |
| 1269 | if 0 < #Effects then | |
| 1270 | for e = 1, #Effects do | |
| 1271 | if Effects[e] ~= nil then | |
| 1272 | local Thing = Effects[e] | |
| 1273 | if Thing ~= nil then | |
| 1274 | local Part = Thing[1] | |
| 1275 | local Mode = Thing[2] | |
| 1276 | local Delay = Thing[3] | |
| 1277 | local IncX = Thing[4] | |
| 1278 | local IncY = Thing[5] | |
| 1279 | local IncZ = Thing[6] | |
| 1280 | if Thing[2] == "Shoot" then | |
| 1281 | local Look = Thing[1] | |
| 1282 | local move = 5 | |
| 1283 | local hit, pos = rayCast(Thing[4], Thing[1], move, Character) | |
| 1284 | if Thing[10] ~= nil then | |
| 1285 | da = pos | |
| 1286 | cf2 = CFrame.new(Thing[4], Thing[10].Position) | |
| 1287 | cfa = CFrame.new(Thing[4], pos) | |
| 1288 | tehCF = cfa:lerp(cf2, 0.2) | |
| 1289 | Thing[1] = tehCF.lookVector | |
| 1290 | end | |
| 1291 | local mag = (Thing[4] - pos).magnitude | |
| 1292 | Effects.Elect.Create(CFrame.new((Thing[4] + pos) / 2, pos), 4, 4, 4) | |
| 1293 | Effects.Sphere.Create(BrickColor.new("Deep blue"), CFrame.new((Thing[4] + pos) / 2, pos) * CFrame.Angles(1.57, 0, 0), 3, 3, 3, 5, 5, 5, 0.15)
| |
| 1294 | Thing[4] = Thing[4] + Look * move | |
| 1295 | Thing[3] = Thing[3] - 1 | |
| 1296 | if 2 < Thing[5] then | |
| 1297 | Thing[5] = Thing[5] - 0.3 | |
| 1298 | Thing[6] = Thing[6] - 0.3 | |
| 1299 | end | |
| 1300 | if hit ~= nil then | |
| 1301 | Thing[3] = 0 | |
| 1302 | MagnitudeDamage(hit, 5, 10, 15, 0, "Normal", "161006093", 0.8) | |
| 1303 | ref = CFuncs.Part.Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new())
| |
| 1304 | ref.Anchored = true | |
| 1305 | ref.CFrame = CFrame.new(pos) | |
| 1306 | Effects.Block.Create(BrickColor.new("Deep blue"), CFrame.new(pos), 1, 1, 1, 2, 2, 2, .05)
| |
| 1307 | Effects.Sphere.Create(BrickColor.new("Deep blue"), CFrame.new(pos), 5, 5, 5, 1, 1, 1, 0.03)
| |
| 1308 | game:GetService("Debris"):AddItem(ref, 1)
| |
| 1309 | end | |
| 1310 | if Thing[3] <= 0 then | |
| 1311 | table.remove(Effects, e) | |
| 1312 | end | |
| 1313 | end | |
| 1314 | do | |
| 1315 | do | |
| 1316 | if Thing[2] == "FireWave" then | |
| 1317 | if Thing[3] <= Thing[4] then | |
| 1318 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(0, 1, 0) | |
| 1319 | Thing[3] = Thing[3] + 1 | |
| 1320 | Thing[6].Scale = Thing[6].Scale + Vector3.new(Thing[5], 0, Thing[5]) | |
| 1321 | else | |
| 1322 | Part.Parent = nil | |
| 1323 | table.remove(Effects, e) | |
| 1324 | end | |
| 1325 | end | |
| 1326 | if Thing[2] ~= "Shoot" and Thing[2] ~= "Wave" and Thing[2] ~= "FireWave" then | |
| 1327 | if Thing[1].Transparency <= 1 then | |
| 1328 | if Thing[2] == "Block1" then | |
| 1329 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
| 1330 | Mesh = Thing[7] | |
| 1331 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
| 1332 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1333 | else | |
| 1334 | if Thing[2] == "Block2" then | |
| 1335 | Thing[1].CFrame = Thing[1].CFrame | |
| 1336 | Mesh = Thing[7] | |
| 1337 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
| 1338 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1339 | else | |
| 1340 | if Thing[2] == "Fire" then | |
| 1341 | Thing[1].CFrame = CFrame.new(Thing[1].Position) + Vector3.new(0, 0.2, 0) | |
| 1342 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
| 1343 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1344 | else | |
| 1345 | if Thing[2] == "Cylinder" then | |
| 1346 | Mesh = Thing[7] | |
| 1347 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
| 1348 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1349 | else | |
| 1350 | if Thing[2] == "Blood" then | |
| 1351 | Mesh = Thing[7] | |
| 1352 | Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, 0.5, 0) | |
| 1353 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
| 1354 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1355 | else | |
| 1356 | if Thing[2] == "Elec" then | |
| 1357 | Thing[1].Size = Thing[1].Size + Vector3.new(Thing[7], Thing[8], Thing[9]) | |
| 1358 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1359 | else | |
| 1360 | if Thing[2] == "Disappear" then | |
| 1361 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1362 | end | |
| 1363 | end | |
| 1364 | end | |
| 1365 | end | |
| 1366 | end | |
| 1367 | end | |
| 1368 | end | |
| 1369 | else | |
| 1370 | Part.Parent = nil | |
| 1371 | table.remove(Effects, e) | |
| 1372 | end | |
| 1373 | end | |
| 1374 | end | |
| 1375 | end | |
| 1376 | end | |
| 1377 | end | |
| 1378 | end | |
| 1379 | end | |
| 1380 | end |