SHOW:
|
|
- or go back to the newest paste.
| 1 | --https://github.com/Mokiros/roblox-FE-compatibility | |
| 2 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
| |
| 3 | local Player,game,owner = owner,game | |
| 4 | local RealPlayer = Player | |
| 5 | do | |
| 6 | print("FE Compatibility code V2 by Mokiros")
| |
| 7 | local RealPlayer = RealPlayer | |
| 8 | script.Parent = RealPlayer.Character | |
| 9 | ||
| 10 | --Fake event to make stuff like Mouse.KeyDown work | |
| 11 | local Disconnect_Function = function(this) | |
| 12 | this[1].Functions[this[2]] = nil | |
| 13 | end | |
| 14 | local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
| |
| 15 | local FakeEvent_Metatable = {__index={
| |
| 16 | Connect = function(this,f) | |
| 17 | local i = tostring(math.random(0,10000)) | |
| 18 | while this.Functions[i] do | |
| 19 | i = tostring(math.random(0,10000)) | |
| 20 | end | |
| 21 | this.Functions[i] = f | |
| 22 | return setmetatable({this,i},Disconnect_Metatable)
| |
| 23 | end | |
| 24 | }} | |
| 25 | FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect | |
| 26 | local function fakeEvent() | |
| 27 | return setmetatable({Functions={}},FakeEvent_Metatable)
| |
| 28 | end | |
| 29 | ||
| 30 | --Creating fake input objects with fake variables | |
| 31 | local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
| |
| 32 | FakeMouse.keyUp = FakeMouse.KeyUp | |
| 33 | FakeMouse.keyDown = FakeMouse.KeyDown | |
| 34 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
| |
| 35 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
| |
| 36 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
| |
| 37 | end} | |
| 38 | --Merged 2 functions into one by checking amount of arguments | |
| 39 | CAS.UnbindAction = CAS.BindAction | |
| 40 | ||
| 41 | --This function will trigger the events that have been :Connect()'ed | |
| 42 | local function TriggerEvent(self,ev,...) | |
| 43 | for _,f in pairs(self[ev].Functions) do | |
| 44 | f(...) | |
| 45 | end | |
| 46 | end | |
| 47 | FakeMouse.TriggerEvent = TriggerEvent | |
| 48 | UIS.TriggerEvent = TriggerEvent | |
| 49 | ||
| 50 | --Client communication | |
| 51 | local Event = Instance.new("RemoteEvent")
| |
| 52 | Event.Name = "UserInput_Event" | |
| 53 | Event.OnServerEvent:Connect(function(plr,io) | |
| 54 | if plr~=RealPlayer then return end | |
| 55 | FakeMouse.Target = io.Target | |
| 56 | FakeMouse.Hit = io.Hit | |
| 57 | if not io.isMouse then | |
| 58 | local b = io.UserInputState == Enum.UserInputState.Begin | |
| 59 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 60 | return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up") | |
| 61 | end | |
| 62 | if io.UserInputType == Enum.UserInputType.MouseButton2 then | |
| 63 | return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up") | |
| 64 | end | |
| 65 | for _,t in pairs(CAS.Actions) do | |
| 66 | for _,k in pairs(t.Keys) do | |
| 67 | if k==io.KeyCode then | |
| 68 | t.Function(t.Name,io.UserInputState,io) | |
| 69 | end | |
| 70 | end | |
| 71 | end | |
| 72 | FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
| 73 | UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false) | |
| 74 | end | |
| 75 | end) | |
| 76 | Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
| |
| 77 | local Mouse = owner:GetMouse() | |
| 78 | local UIS = game:GetService("UserInputService")
| |
| 79 | local input = function(io,RobloxHandled) | |
| 80 | if RobloxHandled then return end | |
| 81 | --Since InputObject is a client-side instance, we create and pass table instead | |
| 82 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
| |
| 83 | end | |
| 84 | UIS.InputBegan:Connect(input) | |
| 85 | UIS.InputEnded:Connect(input) | |
| 86 | local h,t | |
| 87 | --Give the server mouse data every second frame, but only if the values changed | |
| 88 | --If player is not moving their mouse, client won't fire events | |
| 89 | local HB = game:GetService("RunService").Heartbeat
| |
| 90 | while true do | |
| 91 | if h~=Mouse.Hit or t~=Mouse.Target then | |
| 92 | h,t=Mouse.Hit,Mouse.Target | |
| 93 | Event:FireServer({isMouse=true,Target=t,Hit=h})
| |
| 94 | end | |
| 95 | --Wait 2 frames | |
| 96 | for i=1,2 do | |
| 97 | HB:Wait() | |
| 98 | end | |
| 99 | end]==],script) | |
| 100 | ||
| 101 | ----Sandboxed game object that allows the usage of client-side methods and services | |
| 102 | --Real game object | |
| 103 | local RealGame = game | |
| 104 | ||
| 105 | --Metatable for fake service | |
| 106 | local FakeService_Metatable = {
| |
| 107 | __index = function(self,k) | |
| 108 | local s = rawget(self,"_RealService") | |
| 109 | if s then | |
| 110 | return typeof(s[k])=="function" | |
| 111 | and function(_,...)return s[k](s,...)end or s[k] | |
| 112 | end | |
| 113 | end, | |
| 114 | __newindex = function(self,k,v) | |
| 115 | local s = rawget(self,"_RealService") | |
| 116 | if s then s[k]=v end | |
| 117 | end | |
| 118 | } | |
| 119 | local function FakeService(t,RealService) | |
| 120 | t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService | |
| 121 | return setmetatable(t,FakeService_Metatable) | |
| 122 | end | |
| 123 | ||
| 124 | --Fake game object | |
| 125 | local FakeGame = {
| |
| 126 | GetService = function(self,s) | |
| 127 | return rawget(self,s) or RealGame:GetService(s) | |
| 128 | end, | |
| 129 | Players = FakeService({
| |
| 130 | LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
| |
| 131 | },"Players"), | |
| 132 | UserInputService = FakeService(UIS,"UserInputService"), | |
| 133 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
| 134 | RunService = FakeService({
| |
| 135 | _btrs = {},
| |
| 136 | RenderStepped = RealGame:GetService("RunService").Heartbeat,
| |
| 137 | BindToRenderStep = function(self,name,_,fun) | |
| 138 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
| 139 | end, | |
| 140 | UnbindFromRenderStep = function(self,name) | |
| 141 | self._btrs[name]:Disconnect() | |
| 142 | end, | |
| 143 | },"RunService") | |
| 144 | } | |
| 145 | rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer) | |
| 146 | FakeGame.service = FakeGame.GetService | |
| 147 | FakeService(FakeGame,game) | |
| 148 | --Changing owner to fake player object to support owner:GetMouse() | |
| 149 | game,owner = FakeGame,FakeGame.Players.LocalPlayer | |
| 150 | end | |
| 151 | ||
| 152 | ||
| 153 | local armmovments = false | |
| 154 | local plr = game:GetService('Players').LocalPlayer
| |
| 155 | local chr = plr.Character | |
| 156 | local maus = plr:GetMouse() | |
| 157 | local PGui=plr.PlayerGui | |
| 158 | local lleg = chr["Left Leg"] | |
| 159 | local rleg = chr["Right Leg"] | |
| 160 | local larm = chr["Left Arm"] | |
| 161 | local rarm = chr["Right Arm"] | |
| 162 | local hed = chr.Head | |
| 163 | local rutprt = chr.HumanoidRootPart | |
| 164 | local torso = chr.Torso | |
| 165 | local otheranims=false | |
| 166 | local swimming=false | |
| 167 | chr.Animate.Disabled=true | |
| 168 | local fldb={['w']=false,['a']=false,['s']=false,['d']=false}
| |
| 169 | local RunSpeed=50 | |
| 170 | local WlkSpeed=30 | |
| 171 | local SwimSpeed=14 | |
| 172 | local SwimDashSpeed=28 | |
| 173 | local anim = "Idling" | |
| 174 | local lastanim = "Idling" | |
| 175 | local val = 0 | |
| 176 | local syne = 0 | |
| 177 | local num = 0 | |
| 178 | local runtime = 0 | |
| 179 | local pseudohead=hed:Clone() | |
| 180 | for i,x in pairs(pseudohead:GetChildren()) do if not x.ClassName:find('Mesh') then x:Destroy() end end
| |
| 181 | pseudohead.Name='PseudoHead' | |
| 182 | pseudohead.Parent=chr.Head | |
| 183 | local pseudoweld=Instance.new('Weld',torso)
| |
| 184 | pseudoweld.Part0=hed | |
| 185 | pseudoweld.Name='PseudoHedWld' | |
| 186 | pseudoweld.Part1=pseudohead | |
| 187 | hed.Transparency=1 | |
| 188 | local Player = game:GetService('Players').LocalPlayer
| |
| 189 | local Character = Player.Character | |
| 190 | local Mouse = Player:GetMouse() | |
| 191 | local LeftArm = Character:WaitForChild("Left Arm")
| |
| 192 | local RightArm = Character:WaitForChild("Right Arm")
| |
| 193 | local LeftLeg = Character:WaitForChild("Left Leg")
| |
| 194 | local RightLeg = Character:WaitForChild("Right Leg")
| |
| 195 | local Head = Character:WaitForChild("Head")
| |
| 196 | local Torso = Character:WaitForChild("Torso")
| |
| 197 | z = Instance.new("Sound", torso)
| |
| 198 | z.SoundId = "rbxassetid://" -- Put Music ID Here. | |
| 199 | z.Looped = true | |
| 200 | z.Pitch = 0.82 | |
| 201 | z.Volume = 1 | |
| 202 | wait(.1) | |
| 203 | z:Play() | |
| 204 | local RootPart = Character:WaitForChild("HumanoidRootPart")
| |
| 205 | local Humanoid = Character:WaitForChild("Humanoid")
| |
| 206 | local LeftShoulder = Torso:WaitForChild("Left Shoulder")
| |
| 207 | local RightShoulder = Torso:WaitForChild("Right Shoulder")
| |
| 208 | local LeftHip = Torso:WaitForChild("Left Hip")
| |
| 209 | local RightHip = Torso:WaitForChild("Right Hip")
| |
| 210 | local Neck = Torso:WaitForChild("Neck")
| |
| 211 | local RootJoint = RootPart:WaitForChild("RootJoint")
| |
| 212 | local Camera = workspace.CurrentCamera | |
| 213 | local FLeftShoulder, FRightShoulder = Instance.new("Weld", Torso), Instance.new("Weld", Torso)
| |
| 214 | FLeftShoulder.Name = "LS" | |
| 215 | FRightShoulder.Name = "RS" | |
| 216 | local FLeftHip, FRightHip = Instance.new("Weld", Torso), Instance.new("Weld", Torso)
| |
| 217 | FLeftHip.Name = "LH" | |
| 218 | FRightHip.Name = "RH" | |
| 219 | local FRootJoint = Instance.new("Weld", RootPart)
| |
| 220 | FRootJoint.Name = "RJ" | |
| 221 | local F1, F2, F3 = Instance.new("Folder", Character), Instance.new("Folder"), Instance.new("Folder")
| |
| 222 | F1.Name = "Parts Folder" | |
| 223 | F2.Parent = F1 | |
| 224 | F2.Name = "Effects" | |
| 225 | F3.Parent = F1 | |
| 226 | F3.Name = "Extra Parts" | |
| 227 | local Drag_To_Part = Instance.new("Part", F3)
| |
| 228 | Drag_To_Part.Transparency = 1 | |
| 229 | Drag_To_Part.Name = "Drag-to-part" | |
| 230 | Drag_To_Part.Size = Vector3.new(0.2, 0.2, 0.2) | |
| 231 | Drag_To_Part.Anchored = false | |
| 232 | Drag_To_Part.CanCollide = false | |
| 233 | Drag_To_Part.Locked = true | |
| 234 | local DTPWeld = Instance.new("Weld", Drag_To_Part)
| |
| 235 | DTPWeld.Part0 = RootPart | |
| 236 | DTPWeld.Part1 = Drag_To_Part | |
| 237 | local WepWeld, WepWeld2, WepWeld3, SheWeld = nil, nil, nil, nil | |
| 238 | local NLSC0 = LeftShoulder.C0 | |
| 239 | local NLSC1 = LeftShoulder.C1 | |
| 240 | local NRSC0 = RightShoulder.C0 | |
| 241 | local NRSC1 = RightShoulder.C1 | |
| 242 | local NLHC0 = LeftHip.C0 | |
| 243 | local NLHC1 = LeftHip.C1 | |
| 244 | local NRHC0 = RightHip.C0 | |
| 245 | local NRHC1 = RightHip.C1 | |
| 246 | local NNC0 = Neck.C0 | |
| 247 | local NNC1 = Neck.C1 | |
| 248 | local NRJC0 = RootJoint.C0 | |
| 249 | local NRJC1 = RootJoint.C1 | |
| 250 | local Handle, Hit_Box, Handle2, Hit_Box2, TEHandle, TESHandle, TEHit_Box, CEP = nil, nil, nil, nil, nil, nil, nil, nil | |
| 251 | local chatServ = game:GetService("Chat")
| |
| 252 | local runServ = game:GetService("RunService")
| |
| 253 | local debServ = game:GetService("Debris")
| |
| 254 | local CurrentSpeed = 16 | |
| 255 | local Current_Anim = "Idle" | |
| 256 | local Attack_Num = 1 | |
| 257 | local Damage_Buff = 0 | |
| 258 | local Max_Health = 400 | |
| 259 | local Last_Health = Max_Health | |
| 260 | local idle = 1 | |
| 261 | local idlenum = 1 | |
| 262 | local idlenum2 = 1 | |
| 263 | local walk = 1 | |
| 264 | local walknum = 1 | |
| 265 | local walknum2 = 1 | |
| 266 | local Effects = {}
| |
| 267 | local DragTable = {}
| |
| 268 | local InputTable = {}
| |
| 269 | local InputFrameTable = {}
| |
| 270 | local TEBladeP = {}
| |
| 271 | local TEBEffect, c1, c2 = nil, nil, nil | |
| 272 | local RGyro = Instance.new("BodyGyro")
| |
| 273 | RGyro.MaxTorque = Vector3.new(0, 0, 0) | |
| 274 | RGyro.P = 2000 | |
| 275 | local LLCF = CFrame.new() | |
| 276 | local SWP = Instance.new("BoolValue")
| |
| 277 | local ControlScript = Player.PlayerScripts:WaitForChild("ControlScript")
| |
| 278 | local Z_Pressed = false | |
| 279 | local Debounces = {Equipped = false, Equipping = false, HasWep = false, DuelWielding = false, Attacking = false, Locked_On = false, Can_Double_Jump = false, AnimOverride = false, Guarding = false, Crouching = false, JumpAnim = false, DoubleJumpAnim = false, KeyStrokeEnabled = false, Successful_KeyStroke = false, KeyStroke_CoolDown = false, UIAction = false, ZeroGravity = false, DoubleJumping = false, Charging_Erupt = false, Guarding = false, Transformed = false, DisableJump = false, Dashing = false, Hovering = false, TEWield = false, TESWield = false, CanGuard = true, SpedUp = false, HurrSlash = false, Stompped = false}
| |
| 280 | local rad = math.rad | |
| 281 | local huge = math.huge | |
| 282 | local rand = math.random | |
| 283 | local Vec = Vector3.new | |
| 284 | local Cf = CFrame.new | |
| 285 | local Euler = CFrame.fromEulerAnglesXYZ | |
| 286 | local BC = BrickColor.new | |
| 287 | local Col3 = Color3.new | |
| 288 | local Inst = Instance.new | |
| 289 | local Ud2 = UDim2.new | |
| 290 | ||
| 291 | ||
| 292 | ||
| 293 | local FONT = "SourceSansLight" | |
| 294 | ||
| 295 | ||
| 296 | MakeText = function(text, font, duration, tcr, tcg, tcb, scr, scg, scb, cFrame) | |
| 297 | local tpart = Instance.new("Part")
| |
| 298 | tpart.Parent = F2 | |
| 299 | tpart.Transparency = 1 | |
| 300 | tpart.Name = "hoi hoi" | |
| 301 | tpart.Anchored = true | |
| 302 | tpart.CanCollide = false | |
| 303 | tpart.Locked = true | |
| 304 | tpart.Size = Vector3.new(0.2, 0.2, 0.2) | |
| 305 | tpart.CFrame = cFrame * CFrame.new(math.random(-2, 2), 0, math.random(-2, 2)) | |
| 306 | local bill = Instance.new("BillboardGui")
| |
| 307 | bill.Parent = tpart | |
| 308 | bill.AlwaysOnTop = true | |
| 309 | bill.Name = "HUHHHHHNAAAA" | |
| 310 | bill.Size = UDim2.new(4, 0, 4, 0) | |
| 311 | bill.StudsOffset = Vector3.new(0, 1, 0) | |
| 312 | local counter = 0 | |
| 313 | local textl = Instance.new("TextLabel")
| |
| 314 | textl.Parent = bill | |
| 315 | textl.Name = "WHYYYYYYYY" | |
| 316 | textl.BackgroundTransparency = 1 | |
| 317 | textl.Size = UDim2.new(1, 0, 1, 0) | |
| 318 | textl.Font = font | |
| 319 | textl.Text = text | |
| 320 | textl.TextColor3 = Color3.new(tcr / 255, tcg / 255, tcb / 255) | |
| 321 | textl.TextScaled = true | |
| 322 | textl.TextStrokeColor3 = Color3.new(scr / 255, scg / 255, scb / 255) | |
| 323 | textl.TextStrokeTransparency = 0 | |
| 324 | coroutine.resume(coroutine.create(function() | |
| 325 | while textl.TextTransparency < 1 do | |
| 326 | swait() | |
| 327 | if bill.StudsOffset.Y >= 5 then | |
| 328 | if duration <= counter then | |
| 329 | textl.TextTransparency = textl.TextTransparency + 0.15 | |
| 330 | textl.TextStrokeTransparency = textl.TextStrokeTransparency + 0.15 | |
| 331 | end | |
| 332 | end | |
| 333 | counter = counter + 0.1 | |
| 334 | bill.StudsOffset = Vector3.new(0, bill.StudsOffset.Y + 0.15, 0) | |
| 335 | end | |
| 336 | debServ:AddItem(bill, 0) | |
| 337 | debServ:AddItem(textl, 0) | |
| 338 | debServ:AddItem(tpart, 0) | |
| 339 | end)) | |
| 340 | end | |
| 341 | ||
| 342 | Apply_Buff = function(amount, duration) | |
| 343 | ||
| 344 | coroutine.resume(coroutine.create(function() | |
| 345 | ||
| 346 | if amount > 0 and duration > 0 then | |
| 347 | Damage_Buff = Damage_Buff + amount | |
| 348 | MakeText("+" .. amount .. " Damage", FONT, 0.3, 255, 0, 0, 0, 0, 0, RootPart.CFrame)
| |
| 349 | wait(duration) | |
| 350 | Damage_Buff = Damage_Buff - amount | |
| 351 | MakeText("-" .. amount .. " Damage", FONT, 0.3, 255, 0, 0, 0, 0, 0, RootPart.CFrame)
| |
| 352 | end | |
| 353 | end | |
| 354 | )) | |
| 355 | end | |
| 356 | ||
| 357 | Apply_Health_Buff = function(amount, duration) | |
| 358 | ||
| 359 | coroutine.resume(coroutine.create(function() | |
| 360 | ||
| 361 | if amount > 0 and duration > 0 then | |
| 362 | Max_Health = Max_Health + amount | |
| 363 | coroutine.resume(coroutine.create(function() | |
| 364 | ||
| 365 | wait() | |
| 366 | Humanoid.Health = Humanoid.Health + amount | |
| 367 | end | |
| 368 | )) | |
| 369 | MakeText("+" .. amount .. " Max Health", FONT, 0.3, 255, 170, 0, 0, 0, 0, RootPart.CFrame)
| |
| 370 | wait(duration) | |
| 371 | Max_Health = Max_Health - amount | |
| 372 | MakeText("-" .. amount .. " Max Health", FONT, 0.3, 255, 170, 0, 0, 0, 0, RootPart.CFrame)
| |
| 373 | end | |
| 374 | end | |
| 375 | )) | |
| 376 | end | |
| 377 | ||
| 378 | ||
| 379 | FindHum = function(parent) | |
| 380 | ||
| 381 | local hm = nil | |
| 382 | for _,HM in pairs(parent:GetChildren()) do | |
| 383 | if HM:IsA("Humanoid") then
| |
| 384 | hm = HM | |
| 385 | end | |
| 386 | end | |
| 387 | return hm | |
| 388 | end | |
| 389 | ||
| 390 | ||
| 391 | ArtificialHB = Instance.new("BindableEvent", script)
| |
| 392 | ArtificialHB.Name = "Heartbeat" | |
| 393 | script:WaitForChild("Heartbeat")
| |
| 394 | frame = 0.033333333333333 | |
| 395 | tf = 0 | |
| 396 | allowframeloss = false | |
| 397 | tossremainder = false | |
| 398 | lastframe = tick() | |
| 399 | script.Heartbeat:Fire() | |
| 400 | game:GetService("RunService").Heartbeat:connect(function(s, p)
| |
| 401 | tf = tf + s | |
| 402 | if frame <= tf then | |
| 403 | if allowframeloss then | |
| 404 | script.Heartbeat:Fire() | |
| 405 | lastframe = tick() | |
| 406 | else | |
| 407 | for i = 1, math.floor(tf / frame) do | |
| 408 | script.Heartbeat:Fire() | |
| 409 | end | |
| 410 | lastframe = tick() | |
| 411 | end | |
| 412 | if tossremainder then | |
| 413 | tf = 0 | |
| 414 | else | |
| 415 | tf = tf - frame * math.floor(tf / frame) | |
| 416 | end | |
| 417 | end | |
| 418 | end | |
| 419 | ) | |
| 420 | swait = function(num) | |
| 421 | if num == 0 or num == nil then | |
| 422 | ArtificialHB.Event:wait() | |
| 423 | else | |
| 424 | for i = 0, num do | |
| 425 | ArtificialHB.Event:wait() | |
| 426 | end | |
| 427 | end | |
| 428 | end | |
| 429 | ||
| 430 | local DamageFunction = function(Hit, IsRan, MinDam, MaxDam, HKB, Knockback, DamType, Property, Duration, HDrag, DragDuration, SoEff, SoID, SoPit, SoVol) | |
| 431 | ||
| 432 | local humanoid = FindHum(Hit.Parent) | |
| 433 | if humanoid and humanoid ~= Humanoid then | |
| 434 | local IsSafe = true | |
| 435 | local Deb = humanoid:FindFirstChild("ChaosDebounce")
| |
| 436 | if Deb then | |
| 437 | local Cre = Deb:FindFirstChild("Creator")
| |
| 438 | if Cre and Cre.Value == Player.UserId then | |
| 439 | IsSafe = false | |
| 440 | end | |
| 441 | end | |
| 442 | if IsSafe then | |
| 443 | local deb = Inst("BoolValue", humanoid)
| |
| 444 | deb.Name = "ChaosDebounce" | |
| 445 | local cre = Inst("NumberValue", deb)
| |
| 446 | cre.Name = "Creator" | |
| 447 | cre.Value = Player.UserId | |
| 448 | debServ:AddItem(deb, Duration) | |
| 449 | debServ:AddItem(cre, Duration) | |
| 450 | local Damage = 1 | |
| 451 | if IsRan then | |
| 452 | Damage = rand(MinDam, MaxDam) | |
| 453 | else | |
| 454 | Damage = MaxDam | |
| 455 | end | |
| 456 | local this_nigga_had_op_health = false | |
| 457 | if SoEff then | |
| 458 | local HitSound = Sound(Hit, "http://roblox.com/asset/?id=" .. SoID .. "", SoVol, SoPit, false) | |
| 459 | debServ:AddItem(HitSound, 6) | |
| 460 | end | |
| 461 | -- DECOMPILER ERROR at PC100: Unhandled construct in 'MakeBoolean' P1 | |
| 462 | ||
| 463 | if (DamType == "Compensate" or string.sub(DamType, 1, 10) == "Compensate") and (humanoid.MaxHealth >= 100000 or humanoid.MaxHealth == 0) then | |
| 464 | if humanoid.MaxHealth >= 1000000000 or humanoid.MaxHealth == 0 then | |
| 465 | humanoid.MaxHealth = 100 | |
| 466 | this_nigga_had_op_health = true | |
| 467 | end | |
| 468 | Damage = Damage * (humanoid.MaxHealth / 100) | |
| 469 | end | |
| 470 | if humanoid.MaxHealth >= 100000000 or humanoid.MaxHealth == 0 then | |
| 471 | this_nigga_had_op_health = true | |
| 472 | humanoid.MaxHealth = 100 | |
| 473 | end | |
| 474 | if Damage_Buff > 0 then | |
| 475 | Damage = Damage * Damage_Buff | |
| 476 | end | |
| 477 | humanoid.Health = humanoid.Health - Damage | |
| 478 | if humanoid.MaxHealth / 4 <= Damage then | |
| 479 | MakeText("-" .. Damage .. "", "SourceSansBold", 0.3, 170, 0, 0, 255, 85, 0, Hit.CFrame)
| |
| 480 | else | |
| 481 | local mtc = BrickColor.new("Really black").Color
| |
| 482 | MakeText("-" .. Damage .. "", FONT, 0.3, mtc.r * 255, mtc.g * 255, mtc.b * 255, 0, 0, 0, Hit.CFrame)
| |
| 483 | end | |
| 484 | do | |
| 485 | if HKB and (DamType ~= "SkyRocket" or DamType ~= "Compensate-SkyRocket") then | |
| 486 | if Property.Name ~= "Point" then | |
| 487 | humanoid:ChangeState(Enum.HumanoidStateType.FallingDown) | |
| 488 | local KBCF = Cf(Hit.Position, Property.Position) | |
| 489 | Hit.Velocity = KBCF.lookVector * -Knockback | |
| 490 | else | |
| 491 | do | |
| 492 | Hit.Velocity = Property.CFrame.lookVector * Knockback | |
| 493 | if (DamType == "Normal" and DamType == "Stun") or DamType == "Compensate-Stun" then | |
| 494 | MakeText("Stunned", FONT, 0.3, 255, 255, 0, 0, 0, 0, Hit.CFrame)
| |
| 495 | humanoid:ChangeState(Enum.HumanoidStateType.FallingDown) | |
| 496 | local pos = Inst("BodyPosition", Hit)
| |
| 497 | pos.MaxForce = Vec(huge, huge, huge) | |
| 498 | pos.Position = Hit.Position | |
| 499 | debServ:AddItem(pos, Duration * 10) | |
| 500 | else | |
| 501 | do | |
| 502 | if DamType == "LifeSteal" or DamType == "Compensate-LifeSteal" then | |
| 503 | Humanoid.Health = Humanoid.Health + Damage / 2 | |
| 504 | MakeText("+" .. Damage / 2, FONT, 0.4, 0, 0, 0, 0, 255, 0, RootPart.CFrame)
| |
| 505 | else | |
| 506 | if DamType == "MomentumStopper" or DamType == "Compensate-MomentumStopper" then | |
| 507 | local vel = Inst("BodyVelocity", Hit)
| |
| 508 | vel.Name = "MomentumStopper" | |
| 509 | vel.MaxForce = Vec(huge, huge, huge) | |
| 510 | vel.Velocity = Vec(0, 0, 0) | |
| 511 | debServ:AddItem(vel, 3) | |
| 512 | else | |
| 513 | do | |
| 514 | if DamType == "Knockdown" or DamType == "Compensate-Knockdown" then | |
| 515 | humanoid:ChangeState(Enum.HumanoidStateType.FallingDown) | |
| 516 | else | |
| 517 | if DamType == "SkyRocket" or DamType == "Compensate-SkyRocket" then | |
| 518 | humanoid:ChangeState(Enum.HumanoidStateType.FallingDown) | |
| 519 | Hit.Velocity = Vec(0, Knockback, 0) | |
| 520 | if rand(1, 4) == 1 then | |
| 521 | local Twista = Inst("BodyAngularVelocity", Hit)
| |
| 522 | Twista.MaxTorque = Vec(1000000, 1000000, 1000000) | |
| 523 | Twista.AngularVelocity = Vec(rand(-2, 2) * (Knockback / 2), rand(-2, 2) * (Knockback / 2), rand(-2, 2) * (Knockback / 2)) | |
| 524 | debServ:AddItem(Twista, 0.01) | |
| 525 | end | |
| 526 | else | |
| 527 | do | |
| 528 | if DamType == "FreezeStun" or DamType == "Compensate-FreezeStun" then | |
| 529 | MakeText("Stunned", FONT, 0.3, 0, 0, 0, 255, 170, 0, Hit.CFrame)
| |
| 530 | coroutine.resume(coroutine.create(function() | |
| 531 | ||
| 532 | local ti = 0 | |
| 533 | local hHead = Hit.Parent:FindFirstChild("Head")
| |
| 534 | if hHead then | |
| 535 | hHead = Hit | |
| 536 | local h = Inst("Part", F2)
| |
| 537 | h.Size = Vec(0.2, 0.2, 0.2) | |
| 538 | h.CanCollide = false | |
| 539 | h.Transparency = 1 | |
| 540 | h.Position = hHead.Position | |
| 541 | local hWELD = Inst("Weld", h)
| |
| 542 | hWELD.Part0 = hHead | |
| 543 | hWELD.Part1 = h | |
| 544 | hWELD.C0 = Cf(0, -4, 0) | |
| 545 | repeat | |
| 546 | ti = ti + 0.1 | |
| 547 | for _,p in pairs(humanoid.Parent:GetChildren()) do | |
| 548 | if p:IsA("BasePart") then
| |
| 549 | p.Anchored = true | |
| 550 | end | |
| 551 | end | |
| 552 | swait() | |
| 553 | humanoid:ChangeState(Enum.HumanoidStateType.FallingDown) | |
| 554 | local p1 = hHead.Position + Vec(rand(-200, 200) / 100, -(hHead.Size.y * 1.5), rand(-200, 200) / 100) | |
| 555 | local p0 = h.Position | |
| 556 | Lightning(p0, p1, 5, 3, "Deep orange", "Neon", 0.1, 0.2, 0.2) | |
| 557 | until Duration * 12 <= ti | |
| 558 | for _,p in pairs(humanoid.Parent:GetChildren()) do | |
| 559 | if p:IsA("BasePart") then
| |
| 560 | p.Anchored = false | |
| 561 | end | |
| 562 | end | |
| 563 | debServ:AddItem(h, 0) | |
| 564 | end | |
| 565 | end | |
| 566 | )) | |
| 567 | else | |
| 568 | if DamType == "KnockDownFreezeStun" or DamType == "Compensate-KnockDownFreezeStun" then | |
| 569 | MakeText("Stunned", FONT, 0.3, 0, 0, 0, 255, 64, 0, Hit.CFrame)
| |
| 570 | coroutine.resume(coroutine.create(function() | |
| 571 | ||
| 572 | local ti = 0 | |
| 573 | local scf = nil | |
| 574 | local h = Inst("Part", F2)
| |
| 575 | h.Size = Vec(0.2, 0.2, 0.2) | |
| 576 | h.CanCollide = false | |
| 577 | h.Anchored = true | |
| 578 | h.Transparency = 1 | |
| 579 | h.Position = Hit.Position | |
| 580 | h.CFrame = h.CFrame * Euler(rad(-90), 0, 0) | |
| 581 | local IL = {Character, Hit.Parent}
| |
| 582 | local Ground, Pos = workspace:FindPartOnRayWithIgnoreList(Ray.new(h.Position, h.CFrame.lookVector.Unit * 999), IL, true, true) | |
| 583 | if Ground then | |
| 584 | Hit.CFrame = Cf(Pos) * Euler(rad(-90), 0, 0) | |
| 585 | scf = Cf(Pos) * Euler(rad(-90), 0, 0) | |
| 586 | end | |
| 587 | repeat | |
| 588 | ti = ti + 0.1 | |
| 589 | for _,p in pairs(humanoid.Parent:GetChildren()) do | |
| 590 | if p:IsA("BasePart") then
| |
| 591 | p.Anchored = true | |
| 592 | end | |
| 593 | end | |
| 594 | Hit.CFrame = scf | |
| 595 | swait() | |
| 596 | humanoid:ChangeState(Enum.HumanoidStateType.FallingDown) | |
| 597 | until Duration * 7 <= ti | |
| 598 | for _,p in pairs(humanoid.Parent:GetChildren()) do | |
| 599 | if p:IsA("BasePart") then
| |
| 600 | p.Anchored = false | |
| 601 | end | |
| 602 | end | |
| 603 | debServ:AddItem(h, 0) | |
| 604 | end | |
| 605 | )) | |
| 606 | end | |
| 607 | end | |
| 608 | if HDrag then | |
| 609 | humanoid:ChangeState(Enum.HumanoidStateType.FallingDown) | |
| 610 | local pos = Inst("BodyPosition", Hit)
| |
| 611 | pos.MaxForce = Vec(huge, huge, huge) | |
| 612 | pos.Position = Drag_To_Part.Position | |
| 613 | local d = Inst("NumberValue", pos)
| |
| 614 | d.Name = "Duration" | |
| 615 | d.Value = DragDuration | |
| 616 | table.insert(DragTable, pos) | |
| 617 | end | |
| 618 | do | |
| 619 | if this_nigga_had_op_health then | |
| 620 | coroutine.resume(coroutine.create(function() | |
| 621 | ||
| 622 | swait() | |
| 623 | Damage = Damage * 2 | |
| 624 | humanoid.Health = humanoid.Health - Damage | |
| 625 | MakeText("-" .. Damage .. "", FONT, 0.4, 0, 0, 0, 0, 0, 91, Hit.CFrame)
| |
| 626 | end | |
| 627 | )) | |
| 628 | end | |
| 629 | end | |
| 630 | end | |
| 631 | end | |
| 632 | end | |
| 633 | end | |
| 634 | end | |
| 635 | end | |
| 636 | end | |
| 637 | end | |
| 638 | end | |
| 639 | end | |
| 640 | end | |
| 641 | end | |
| 642 | end | |
| 643 | end | |
| 644 | end | |
| 645 | ||
| 646 | MagniDamage = function(Part, range, isRan, mindam, maxdam, hkb, knock, DType, dur, hd, dd, soe, soid, sopit, sovol) | |
| 647 | ||
| 648 | for _,c in pairs(workspace:GetChildren()) do | |
| 649 | local hum = FindHum(c) | |
| 650 | if hum and hum ~= Humanoid then | |
| 651 | local head = c:FindFirstChild("Head")
| |
| 652 | local tor = c:FindFirstChild("Torso")
| |
| 653 | local larm = c:FindFirstChild("Left Arm")
| |
| 654 | local rarm = c:FindFirstChild("Right Arm")
| |
| 655 | local lleg = c:FindFirstChild("Left Leg")
| |
| 656 | local rleg = c:FindFirstChild("Right Leg")
| |
| 657 | local Dis = range | |
| 658 | local Par = nil | |
| 659 | if head then | |
| 660 | local Mag = (head.Position - Part.Position).magnitude | |
| 661 | if Mag <= Dis then | |
| 662 | Dis = Mag | |
| 663 | Par = head | |
| 664 | end | |
| 665 | end | |
| 666 | if tor then | |
| 667 | local Mag = (tor.Position - Part.Position).magnitude | |
| 668 | if Mag <= Dis then | |
| 669 | Dis = Mag | |
| 670 | Par = tor | |
| 671 | end | |
| 672 | end | |
| 673 | if rarm then | |
| 674 | local Mag = (rarm.Position - Part.Position).magnitude | |
| 675 | if Mag <= Dis then | |
| 676 | Dis = Mag | |
| 677 | Par = rarm | |
| 678 | end | |
| 679 | end | |
| 680 | if larm then | |
| 681 | local Mag = (larm.Position - Part.Position).magnitude | |
| 682 | if Mag <= Dis then | |
| 683 | Dis = Mag | |
| 684 | Par = larm | |
| 685 | end | |
| 686 | end | |
| 687 | if rleg then | |
| 688 | local Mag = (rleg.Position - Part.Position).magnitude | |
| 689 | if Mag <= Dis then | |
| 690 | Dis = Mag | |
| 691 | Par = rleg | |
| 692 | end | |
| 693 | end | |
| 694 | if lleg then | |
| 695 | local Mag = (lleg.Position - Part.Position).magnitude | |
| 696 | if Mag <= Dis then | |
| 697 | Dis = Mag | |
| 698 | Par = lleg | |
| 699 | end | |
| 700 | end | |
| 701 | if Par then | |
| 702 | DamageFunction(Par, isRan, mindam, maxdam, hkb, knock, DType, Part, dur, hd, dd, soe, soid, sopit, sovol) | |
| 703 | end | |
| 704 | -- DECOMPILER ERROR at PC113: LeaveBlock: unexpected jumping out DO_STMT | |
| 705 | ||
| 706 | -- DECOMPILER ERROR at PC113: LeaveBlock: unexpected jumping out DO_STMT | |
| 707 | ||
| 708 | -- DECOMPILER ERROR at PC113: LeaveBlock: unexpected jumping out DO_STMT | |
| 709 | ||
| 710 | -- DECOMPILER ERROR at PC113: LeaveBlock: unexpected jumping out DO_STMT | |
| 711 | ||
| 712 | -- DECOMPILER ERROR at PC113: LeaveBlock: unexpected jumping out DO_STMT | |
| 713 | ||
| 714 | -- DECOMPILER ERROR at PC113: LeaveBlock: unexpected jumping out DO_STMT | |
| 715 | ||
| 716 | -- DECOMPILER ERROR at PC113: LeaveBlock: unexpected jumping out IF_THEN_STMT | |
| 717 | ||
| 718 | -- DECOMPILER ERROR at PC113: LeaveBlock: unexpected jumping out IF_STMT | |
| 719 | ||
| 720 | end | |
| 721 | end | |
| 722 | end | |
| 723 | ||
| 724 | ||
| 725 | ||
| 726 | ||
| 727 | ||
| 728 | ||
| 729 | CreatePart = function(className, parent, Brickcolor, Material, Transparency, Reflectance, Name, Size, Position, Rotation, MeshClass, MeshScale, MeshId, MeshType) | |
| 730 | ||
| 731 | local Part = Instance.new(className, parent) | |
| 732 | Part.BrickColor = BrickColor.new(Brickcolor) | |
| 733 | Part.Transparency = Transparency | |
| 734 | Part.Reflectance = Reflectance | |
| 735 | Part.Material = Material | |
| 736 | Part.Name = Name | |
| 737 | Part.Anchored = true | |
| 738 | Part.CanCollide = false | |
| 739 | Part.Locked = true | |
| 740 | Part.Size = Size | |
| 741 | Part.Position = Position | |
| 742 | Part.Rotation = Rotation | |
| 743 | Part.TopSurface = "SmoothNoOutlines" | |
| 744 | Part.BottomSurface = "SmoothNoOutlines" | |
| 745 | Part.FrontSurface = "SmoothNoOutlines" | |
| 746 | Part.BackSurface = "SmoothNoOutlines" | |
| 747 | Part.RightSurface = "SmoothNoOutlines" | |
| 748 | Part.LeftSurface = "SmoothNoOutlines" | |
| 749 | local Mesh = Instance.new(MeshClass, Part) | |
| 750 | Mesh.Scale = MeshScale | |
| 751 | if MeshClass == "SpecialMesh" then | |
| 752 | Mesh.MeshId = MeshId | |
| 753 | Mesh.MeshType = MeshType | |
| 754 | end | |
| 755 | return Part | |
| 756 | end | |
| 757 | ||
| 758 | ||
| 759 | ||
| 760 | rayCast = function(Pos, Dir, Max, Ignore) | |
| 761 | ||
| 762 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
| |
| 763 | end | |
| 764 | ||
| 765 | local Point = Torso.CFrame * Cf(0, Torso.Size.Y, 0) | |
| 766 | LastPoint = Point | |
| 767 | effect = function(Color, Ref, LP, P1, returnn) | |
| 768 | ||
| 769 | local effectsmsh = Instance.new("CylinderMesh")
| |
| 770 | effectsmsh.Scale = Vector3.new(0.2, 1, 0.2) | |
| 771 | effectsmsh.Name = "Mesh" | |
| 772 | local effectsg = Instance.new("Part")
| |
| 773 | effectsg.formFactor = 3 | |
| 774 | effectsg.CanCollide = false | |
| 775 | effectsg.Name = "Eff" | |
| 776 | effectsg.Locked = true | |
| 777 | effectsg.Anchored = true | |
| 778 | effectsg.Size = Vector3.new(0.5, 1, 0.5) | |
| 779 | effectsg.Parent = F2 | |
| 780 | effectsmsh.Parent = effectsg | |
| 781 | effectsg.BrickColor = BrickColor.new(Color) | |
| 782 | effectsg.Reflectance = Ref | |
| 783 | local point1 = P1 | |
| 784 | local mg = (LP.p - point1.p).magnitude | |
| 785 | effectsg.Size = Vector3.new(0.5, mg, 0.5) | |
| 786 | effectsg.CFrame = Cf((LP.p + point1.p) / 2, point1.p) * CFrame.Angles(math.rad(90), 0, 0) | |
| 787 | effectsmsh.Scale = Vector3.new(0.2, 1, 0.2) | |
| 788 | game:GetService("Debris"):AddItem(effectsg, 2)
| |
| 789 | if returnn then | |
| 790 | return effectsg | |
| 791 | end | |
| 792 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
| 793 | ||
| 794 | if not returnn then | |
| 795 | for i = 0, 1, 0.05 do | |
| 796 | swait() | |
| 797 | Part.Transparency = 1 * i | |
| 798 | Mesh.Scale = Vector3.new(0.5 - 0.5 * i, 1, 0.5 - 0.5 * i) | |
| 799 | end | |
| 800 | Part.Parent = nil | |
| 801 | end | |
| 802 | end | |
| 803 | ), effectsg, effectsmsh) | |
| 804 | end | |
| 805 | ||
| 806 | local CFrameFromTopBack = function(at, top, back) | |
| 807 | ||
| 808 | local right = top:Cross(back) | |
| 809 | return CFrame.new(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z) | |
| 810 | end | |
| 811 | ||
| 812 | NoOutline = function(Part) | |
| 813 | ||
| 814 | Part.TopSurface = 10 | |
| 815 | end | |
| 816 | ||
| 817 | pert = function(parent, reflectance, transparency, brickcolor, name, size, material) | |
| 818 | ||
| 819 | local fp = Inst("Part")
| |
| 820 | fp.Parent = parent | |
| 821 | fp.Reflectance = reflectance | |
| 822 | fp.Transparency = transparency | |
| 823 | fp.CanCollide = false | |
| 824 | fp.Locked = true | |
| 825 | fp.BrickColor = brickcolor | |
| 826 | fp.Name = name | |
| 827 | fp.Size = size | |
| 828 | fp.Position = Torso.Position | |
| 829 | NoOutline(fp) | |
| 830 | fp.Material = material | |
| 831 | fp:BreakJoints() | |
| 832 | return fp | |
| 833 | end | |
| 834 | ||
| 835 | mesh = function(Mesh, part, meshtype, meshid, offset, scale) | |
| 836 | ||
| 837 | local mesh = Inst(Mesh) | |
| 838 | mesh.Parent = part | |
| 839 | if Mesh == "SpecialMesh" then | |
| 840 | mesh.MeshType = meshtype | |
| 841 | mesh.MeshId = meshid | |
| 842 | end | |
| 843 | mesh.Offset = offset | |
| 844 | mesh.Scale = scale | |
| 845 | return mesh | |
| 846 | end | |
| 847 | ||
| 848 | MagicBlock = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay) | |
| 849 | ||
| 850 | local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material) | |
| 851 | prt.Anchored = true | |
| 852 | prt.CFrame = cframe | |
| 853 | local msh = mesh("BlockMesh", prt, "", "", Vec(0, 0, 0), Vec(x1, y1, z1))
| |
| 854 | game:GetService("Debris"):AddItem(prt, 5)
| |
| 855 | table.insert(Effects, {prt, "Block1", Delay, x3, y3, z3})
| |
| 856 | end | |
| 857 | ||
| 858 | MagicBlock2 = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay) | |
| 859 | ||
| 860 | local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material) | |
| 861 | prt.Anchored = true | |
| 862 | prt.CFrame = cframe | |
| 863 | local msh = mesh("BlockMesh", prt, "", "", Vec(0, 0, 0), Vec(x1, y1, z1))
| |
| 864 | game:GetService("Debris"):AddItem(prt, 5)
| |
| 865 | table.insert(Effects, {prt, "Disappear", Delay, x3, y3, z3})
| |
| 866 | end | |
| 867 | ||
| 868 | MagicSpikeBall = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay) | |
| 869 | ||
| 870 | local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material) | |
| 871 | prt.Anchored = true | |
| 872 | prt.CFrame = cframe | |
| 873 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/Asset/?id=9982590", Vec(0, 0, 0), Vec(x1, y1, z1))
| |
| 874 | game:GetService("Debris"):AddItem(prt, 5)
| |
| 875 | table.insert(Effects, {prt, "Block1", Delay, x3, y3, z3})
| |
| 876 | end | |
| 877 | ||
| 878 | MagicCircle = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay) | |
| 879 | ||
| 880 | local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material) | |
| 881 | prt.Anchored = true | |
| 882 | prt.CFrame = cframe | |
| 883 | local msh = mesh("SpecialMesh", prt, "Sphere", "", Vec(0, 0, 0), Vec(x1, y1, z1))
| |
| 884 | game:GetService("Debris"):AddItem(prt, 5)
| |
| 885 | table.insert(Effects, {prt, "Cylinder", Delay, x3, y3, z3})
| |
| 886 | end | |
| 887 | ||
| 888 | MagicWave = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay) | |
| 889 | ||
| 890 | local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material) | |
| 891 | prt.Anchored = true | |
| 892 | prt.CFrame = cframe | |
| 893 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=20329976", Vec(0, 0, 0), Vec(x1, y1, z1))
| |
| 894 | game:GetService("Debris"):AddItem(prt, 5)
| |
| 895 | table.insert(Effects, {prt, "Cylinder", Delay, x3, y3, z3})
| |
| 896 | end | |
| 897 | ||
| 898 | MagicWave2 = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay) | |
| 899 | ||
| 900 | local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material) | |
| 901 | prt.Anchored = true | |
| 902 | prt.CFrame = cframe | |
| 903 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=20329976", Vec(0, 0, 0), Vec(x1, y1, z1))
| |
| 904 | game:GetService("Debris"):AddItem(prt, 5)
| |
| 905 | table.insert(Effects, {prt, "Wave", Delay, x3, y3, z3})
| |
| 906 | end | |
| 907 | ||
| 908 | MagicCylinder = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay) | |
| 909 | ||
| 910 | local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(0.2, 0.2, 0.2), material) | |
| 911 | prt.Anchored = true | |
| 912 | prt.CFrame = cframe | |
| 913 | local msh = mesh("SpecialMesh", prt, "Head", "", Vec(0, 0, 0), Vec(x1, y1, z1))
| |
| 914 | game:GetService("Debris"):AddItem(prt, 5)
| |
| 915 | Effects[#Effects + 1] = {prt, "Cylinder", Delay, x3, y3, z3}
| |
| 916 | end | |
| 917 | ||
| 918 | MagicCylinder2 = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay) | |
| 919 | ||
| 920 | local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(0.2, 0.2, 0.2), material) | |
| 921 | prt.Anchored = true | |
| 922 | prt.CFrame = cframe | |
| 923 | local msh = mesh("CylinderMesh", prt, "", "", Vec(0, 0, 0), Vec(x1, y1, z1))
| |
| 924 | game:GetService("Debris"):AddItem(prt, 5)
| |
| 925 | Effects[#Effects + 1] = {prt, "Cylinder", Delay, x3, y3, z3}
| |
| 926 | end | |
| 927 | ||
| 928 | MagicBlood = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay) | |
| 929 | ||
| 930 | local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material) | |
| 931 | prt.Anchored = true | |
| 932 | prt.CFrame = cframe | |
| 933 | local msh = mesh("SpecialMesh", prt, "Sphere", "", Vec(0, 0, 0), Vec(x1, y1, z1))
| |
| 934 | game:GetService("Debris"):AddItem(prt, 5)
| |
| 935 | table.insert(Effects, {prt, "Blood", Delay, x3, y3, z3})
| |
| 936 | end | |
| 937 | ||
| 938 | MagicRing = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay) | |
| 939 | ||
| 940 | local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material) | |
| 941 | prt.Anchored = true | |
| 942 | prt.CFrame = cframe | |
| 943 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=3270017", Vec(0, 0, 0), Vec(x1, y1, z1))
| |
| 944 | game:GetService("Debris"):AddItem(prt, 5)
| |
| 945 | table.insert(Effects, {prt, "Cylinder", Delay, x3, y3, z3})
| |
| 946 | end | |
| 947 | ||
| 948 | MagicRing2 = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay) | |
| 949 | ||
| 950 | local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material) | |
| 951 | prt.Anchored = true | |
| 952 | prt.CFrame = cframe | |
| 953 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=3270017", Vec(0, 0, 0), Vec(x1, y1, z1))
| |
| 954 | game:GetService("Debris"):AddItem(prt, 5)
| |
| 955 | table.insert(Effects, {prt, "Blood", Delay, x3, y3, z3})
| |
| 956 | end | |
| 957 | ||
| 958 | ElecEffect = function(brickCol, Mat, cff, x, y, z) | |
| 959 | ||
| 960 | local prt = pert(F2, 0, 0, brickCol, "Part", Vec(1, 1, 1), Mat) | |
| 961 | prt.Anchored = true | |
| 962 | prt.CFrame = cff * Cf(rand(-x, x), rand(-y, y), rand(-z, z)) | |
| 963 | prt.CFrame = Cf(prt.Position) | |
| 964 | debServ:AddItem(prt, 2) | |
| 965 | local xval = math.random() / 2 | |
| 966 | local yval = math.random() / 2 | |
| 967 | local zval = math.random() / 2 | |
| 968 | local msh = mesh("BlockMesh", prt, "", "", Vec(0, 0, 0), Vec(xval, yval, zval))
| |
| 969 | Effects[#Effects + 1] = {prt, "Elec", 0.1, x, y, z, xval, yval, zval}
| |
| 970 | end | |
| 971 | ||
| 972 | Lightning = function(p0, p1, tym, ofs, col, mat, th, tra, last) | |
| 973 | ||
| 974 | local magz = (p0 - p1).magnitude | |
| 975 | local curpos = p0 | |
| 976 | local trz = {-ofs, ofs}
| |
| 977 | for i = 1, tym do | |
| 978 | local li = Instance.new("Part", F2)
| |
| 979 | li.TopSurface = 0 | |
| 980 | li.BottomSurface = 0 | |
| 981 | li.Anchored = true | |
| 982 | li.Transparency = tra or 0.4 | |
| 983 | li.BrickColor = BrickColor.new(col) | |
| 984 | li.Material = mat | |
| 985 | li.Material = "Neon" | |
| 986 | li.formFactor = "Custom" | |
| 987 | li.CanCollide = false | |
| 988 | li.Size = Vector3.new(th, th, magz / tym) | |
| 989 | local ofz = Vector3.new(trz[math.random(1, 2)], trz[math.random(1, 2)], trz[math.random(1, 2)]) | |
| 990 | local trolpos = CFrame.new(curpos, p1) * CFrame.new(0, 0, magz / tym).p + ofz | |
| 991 | if tym == i then | |
| 992 | local magz2 = (curpos - p1).magnitude | |
| 993 | li.Size = Vector3.new(th, th, magz2) | |
| 994 | li.CFrame = CFrame.new(curpos, p1) * CFrame.new(0, 0, -magz2 / 2) | |
| 995 | game:GetService("Debris"):AddItem(li, last)
| |
| 996 | else | |
| 997 | li.CFrame = CFrame.new(curpos, trolpos) * CFrame.new(0, 0, magz / tym / 2) | |
| 998 | curpos = li.CFrame * CFrame.new(0, 0, magz / tym / 2).p | |
| 999 | game:GetService("Debris"):AddItem(li, last)
| |
| 1000 | end | |
| 1001 | end | |
| 1002 | end | |
| 1003 | ||
| 1004 | Triangle = function(a, b, c, tcol, tmat) | |
| 1005 | ||
| 1006 | local edg1 = (c-a):Dot((b-a).unit) | |
| 1007 | local edg2 = (a-b):Dot((c-b).unit) | |
| 1008 | local edg3 = (b-c):Dot((a-c).unit) | |
| 1009 | if edg1 <= (b - a).magnitude and edg1 >= 0 then | |
| 1010 | a = a | |
| 1011 | elseif edg2 <= (c - b).magnitude and edg2 >= 0 then | |
| 1012 | a = b | |
| 1013 | elseif edg3 <= (a - c).magnitude and edg3 >= 0 then | |
| 1014 | a = c | |
| 1015 | else | |
| 1016 | return | |
| 1017 | end | |
| 1018 | local len1 = (c-a):Dot((b-a).unit) | |
| 1019 | local len2 = (b-a).magnitude - len1 | |
| 1020 | local width = (a + (b-a).unit*len1 - c).magnitude | |
| 1021 | local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit) | |
| 1022 | local list = {}
| |
| 1023 | if len1 > 0.01 then | |
| 1024 | local w1 = Inst("WedgePart", F2)
| |
| 1025 | w1.Material = tmat | |
| 1026 | w1.BrickColor = BC(tcol) | |
| 1027 | w1.Transparency = 0 | |
| 1028 | w1.Reflectance = 0 | |
| 1029 | w1.CanCollide = false | |
| 1030 | NoOutline(w1) | |
| 1031 | local sz = Vec(0.2, width, len1) | |
| 1032 | w1.Size = sz | |
| 1033 | local sp = Inst("SpecialMesh", w1)
| |
| 1034 | sp.MeshType = "Wedge" | |
| 1035 | sp.Scale = Vec(0, 1, 1) * sz / w1.Size | |
| 1036 | w1:BreakJoints() | |
| 1037 | w1.Anchored = true | |
| 1038 | w1.Transparency = 0.7 | |
| 1039 | debServ:AddItem(w1, 25) | |
| 1040 | table.insert(Effects, {w1, "Disappear", 0.045})
| |
| 1041 | w1.CFrame = maincf * CFrame.Angles(math.pi, 0, math.pi / 2) * CFrame.new(0, width / 2, len1 / 2) | |
| 1042 | table.insert(list, w1) | |
| 1043 | end | |
| 1044 | if len2 > 0.01 then | |
| 1045 | local w2 = Inst("WedgePart", F2)
| |
| 1046 | w2.Material = tmat | |
| 1047 | w2.BrickColor = BC(tcol) | |
| 1048 | w2.Transparency = 0 | |
| 1049 | w2.Reflectance = 0 | |
| 1050 | w2.CanCollide = false | |
| 1051 | NoOutline(w2) | |
| 1052 | local sz = Vec(0.2, width, len2) | |
| 1053 | w2.Size = sz | |
| 1054 | local sp = Inst("SpecialMesh", w2)
| |
| 1055 | sp.MeshType = "Wedge" | |
| 1056 | sp.Scale = Vec(0, 1, 1) * sz / w2.Size | |
| 1057 | w2:BreakJoints() | |
| 1058 | w2.Anchored = true | |
| 1059 | w2.Transparency = 0.7 | |
| 1060 | debServ:AddItem(w2, 25) | |
| 1061 | table.insert(Effects, {w2, "Disappear", 0.045})
| |
| 1062 | w2.CFrame = maincf * CFrame.Angles(math.pi, math.pi, -math.pi / 2) * CFrame.new(0, width / 2, -len1 - len2 / 2) | |
| 1063 | table.insert(list, w2) | |
| 1064 | end | |
| 1065 | return unpack(list) | |
| 1066 | end | |
| 1067 | ||
| 1068 | ||
| 1069 | runServ.RenderStepped:connect(function() | |
| 1070 | if #Effects > 0 then | |
| 1071 | for e = 1, #Effects do | |
| 1072 | if Effects[e] ~= nil then | |
| 1073 | local Thing = Effects[e] | |
| 1074 | if Thing ~= nil then | |
| 1075 | local Part = Thing[1] | |
| 1076 | local Mode = Thing[2] | |
| 1077 | local Delay = Thing[3] | |
| 1078 | local IncX = Thing[4] | |
| 1079 | local IncY = Thing[5] | |
| 1080 | local IncZ = Thing[6] | |
| 1081 | if Thing[1].Transparency <= 1 then | |
| 1082 | if Thing[2] == "Block1" then | |
| 1083 | Thing[1].CFrame = Thing[1].CFrame * Euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
| 1084 | Mesh = Thing[1]:FindFirstChild("Mesh")
| |
| 1085 | if not Mesh then | |
| 1086 | Mesh = Instance.new("BlockMesh")
| |
| 1087 | end | |
| 1088 | Mesh.Scale = Mesh.Scale + Vec(Thing[4], Thing[5], Thing[6]) | |
| 1089 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1090 | elseif Thing[2] == "Wave" then | |
| 1091 | Thing[1].CFrame = Thing[1].CFrame * CFrame.Angles(0, rad(10), 0) | |
| 1092 | Mesh = Thing[1]:FindFirstChild("Mesh")
| |
| 1093 | if not Mesh then | |
| 1094 | Mesh = Instance.new("BlockMesh")
| |
| 1095 | end | |
| 1096 | Mesh.Scale = Mesh.Scale + Vec(Thing[4], Thing[5], Thing[6]) | |
| 1097 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1098 | elseif Thing[2] == "Cylinder" then | |
| 1099 | Mesh = Thing[1]:FindFirstChild("Mesh")
| |
| 1100 | if not Mesh then | |
| 1101 | Mesh = Instance.new("BlockMesh")
| |
| 1102 | end | |
| 1103 | Mesh.Scale = Mesh.Scale + Vec(Thing[4], Thing[5], Thing[6]) | |
| 1104 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1105 | elseif Thing[2] == "Blood" then | |
| 1106 | Mesh = Thing[1]:FindFirstChild("Mesh")
| |
| 1107 | if not Mesh then | |
| 1108 | Mesh = Instance.new("BlockMesh")
| |
| 1109 | end | |
| 1110 | Thing[1].CFrame = Thing[1].CFrame * Cf(0, 0.5, 0) | |
| 1111 | Mesh.Scale = Mesh.Scale + Vec(Thing[4], Thing[5], Thing[6]) | |
| 1112 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1113 | elseif Thing[2] == "Elec" then | |
| 1114 | Mesh = Thing[1]:FindFirstChild("Mesh")
| |
| 1115 | if not Mesh then | |
| 1116 | Mesh = Instance.new("BlockMesh")
| |
| 1117 | end | |
| 1118 | Mesh.Scale = Mesh.Scale + Vec(Thing[7], Thing[8], Thing[9]) | |
| 1119 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1120 | elseif Thing[2] == "Disappear" then | |
| 1121 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1122 | end | |
| 1123 | else | |
| 1124 | Part.Parent = nil | |
| 1125 | debServ:AddItem(Part, 0) | |
| 1126 | table.remove(Effects, e) | |
| 1127 | end | |
| 1128 | end | |
| 1129 | end | |
| 1130 | end | |
| 1131 | end | |
| 1132 | end) | |
| 1133 | ||
| 1134 | ||
| 1135 | ||
| 1136 | ||
| 1137 | ||
| 1138 | ||
| 1139 | maus.KeyDown:connect(function(kei) | |
| 1140 | if string.byte(kei)==48 and not otheranims then | |
| 1141 | runnin=true | |
| 1142 | end | |
| 1143 | if kei=='w' then fldb.w=true end | |
| 1144 | if kei=='a' then fldb.a=true end | |
| 1145 | if kei=='s' then fldb.s=true end | |
| 1146 | if kei=='d' then fldb.d=true end | |
| 1147 | end) | |
| 1148 | maus.KeyUp:connect(function(kei) | |
| 1149 | if string.byte(kei)==48 and not otheranims then | |
| 1150 | runnin=false | |
| 1151 | end | |
| 1152 | if kei=='w' then fldb.w=false end | |
| 1153 | if kei=='a' then fldb.a=false end | |
| 1154 | if kei=='s' then fldb.s=false end | |
| 1155 | if kei=='d' then fldb.d=false end | |
| 1156 | end) | |
| 1157 | ||
| 1158 | ||
| 1159 | ||
| 1160 | maus.KeyDown:connect(function(kei) | |
| 1161 | if kei=='z' and attack ~= "false" then | |
| 1162 | ||
| 1163 | attackone() | |
| 1164 | ||
| 1165 | elseif kei=='x' and attack ~= "false" then | |
| 1166 | ||
| 1167 | attacktwo() | |
| 1168 | ||
| 1169 | elseif kei=='c' and attack ~= "false" then | |
| 1170 | ||
| 1171 | attackthree() | |
| 1172 | ||
| 1173 | elseif kei=='v' and attack ~= "false" then | |
| 1174 | ||
| 1175 | Untimatum() | |
| 1176 | ||
| 1177 | end | |
| 1178 | end) | |
| 1179 | ||
| 1180 | ||
| 1181 | ||
| 1182 | ||
| 1183 | ||
| 1184 | coroutine.wrap(function() | |
| 1185 | for i,x in pairs(hed:GetChildren()) do if x:IsA('Sound') then x:Destroy() end end end)()
| |
| 1186 | function Lerp(a, b, i) | |
| 1187 | local com1 = {a.X, a.Y, a.Z, a:toEulerAnglesXYZ()}
| |
| 1188 | local com2 = {b.X, b.Y, b.Z, b:toEulerAnglesXYZ()}
| |
| 1189 | local calx = com1[1] + (com2[1] - com1[1]) * i | |
| 1190 | local caly = com1[2] + (com2[2] - com1[2]) * i | |
| 1191 | local calz = com1[3] + (com2[3] - com1[3]) * i | |
| 1192 | local cala = com1[4] + (com2[4] - com1[4]) * i | |
| 1193 | local calb = com1[5] + (com2[5] - com1[5]) * i | |
| 1194 | local calc = com1[6] + (com2[6] - com1[6]) * i | |
| 1195 | return CFrame.new(calx, caly, calz) * CFrame.Angles(cala, calb, calc) | |
| 1196 | end | |
| 1197 | function TwnSingleNumber(s,f,m) | |
| 1198 | local wot=s+(f-s)*m | |
| 1199 | return wot | |
| 1200 | end | |
| 1201 | function TwnVector3(q,w,e) | |
| 1202 | local begin={q.x,q.y,q.z}
| |
| 1203 | local ending={w.x,w.y,w.z}
| |
| 1204 | local bgx=begin[1]+(ending[1]-begin[1])*e | |
| 1205 | local bgy=begin[2]+(ending[2]-begin[2])*e | |
| 1206 | local bgz=begin[3]+(ending[3]-begin[3])*e | |
| 1207 | return Vector3.new(bgx,bgy,bgz) | |
| 1208 | end | |
| 1209 | newWeld = function(wld, wp0, wp1, wc0x, wc0y, wc0z) | |
| 1210 | wld = Instance.new("Weld", wp1)
| |
| 1211 | wld.Part0 = wp0 | |
| 1212 | wld.Part1 = wp1 | |
| 1213 | wld.C0 = CFrame.new(wc0x, wc0y, wc0z) | |
| 1214 | end | |
| 1215 | newWeld(law, torso, larm, -1.5, 0.5, 0) | |
| 1216 | newWeld(raw, torso, rarm, 1.5, 0.5, 0) | |
| 1217 | newWeld(llw, torso, lleg, -.5, -2, 0) | |
| 1218 | newWeld(rlw, torso, rleg, .5, -2, 0) | |
| 1219 | newWeld(hw, torso, hed, 0, 1.5, 0) | |
| 1220 | local rutwald=Instance.new('Weld',rutprt)
| |
| 1221 | rutwald.Part0=rutprt | |
| 1222 | rutwald.Part1=torso | |
| 1223 | rutprt.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),0) | |
| 1224 | larm.Weld.C1 = CFrame.new(0, 0.5, 0)*CFrame.Angles(math.rad(0),0,0) | |
| 1225 | rarm.Weld.C1 = CFrame.new(0, 0.5, 0)*CFrame.Angles(math.rad(0),0,0) | |
| 1226 | rleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0) | |
| 1227 | lleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0) | |
| 1228 | ||
| 1229 | local function setupPart(part) | |
| 1230 | part.Anchored = true | |
| 1231 | part.FormFactor = 'Custom' | |
| 1232 | part.CanCollide = false | |
| 1233 | part.BrickColor = BrickColor.new("Dark indigo")
| |
| 1234 | part.Material = "Neon" | |
| 1235 | part.TopSurface = 'SmoothNoOutlines' | |
| 1236 | part.BottomSurface = 'SmoothNoOutlines' | |
| 1237 | part.FrontSurface = 'SmoothNoOutlines' | |
| 1238 | part.BackSurface = 'SmoothNoOutlines' | |
| 1239 | part.LeftSurface = 'SmoothNoOutlines' | |
| 1240 | part.RightSurface = 'SmoothNoOutlines' | |
| 1241 | end | |
| 1242 | ||
| 1243 | function CFrameFromTopBack(at, top, back) | |
| 1244 | local right = top:Cross(back) | |
| 1245 | return CFrame.new(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z) | |
| 1246 | end | |
| 1247 | ||
| 1248 | function CreateTriangle(parent, a, b, c) | |
| 1249 | local this = {}
| |
| 1250 | local mPart1 = Instance.new('WedgePart')
| |
| 1251 | setupPart(mPart1) | |
| 1252 | local mPart2 = Instance.new('WedgePart')
| |
| 1253 | setupPart(mPart2) | |
| 1254 | function this:Set(a, b, c) --[[ edg1 A ------|------>B --. '\ | / \ \part1|part2/ | \ cut / / Direction edges point in: edg3 \ / edg2 / (clockwise) \ / |/ \<- / ` \ / C --]] | |
| 1255 | local ab, bc, ca = b-a, c-b, a-c local abm, bcm, cam = ab.magnitude, bc.magnitude, ca.magnitude | |
| 1256 | local edg1 = math.abs(0.5 + ca:Dot(ab)/(abm*abm)) | |
| 1257 | local edg2 = math.abs(0.5 + ab:Dot(bc)/(bcm*bcm)) | |
| 1258 | local edg3 = math.abs(0.5 + bc:Dot(ca)/(cam*cam)) | |
| 1259 | if edg1 < edg2 then | |
| 1260 | if edg1 < edg3 then | |
| 1261 | -- nothing to change | |
| 1262 | else | |
| 1263 | a, b, c = c, a, b | |
| 1264 | ab, bc, ca = ca, ab, bc | |
| 1265 | abm = cam | |
| 1266 | end | |
| 1267 | else | |
| 1268 | if edg2 < edg3 then | |
| 1269 | a, b, c = b, c, a | |
| 1270 | ab, bc, ca = bc, ca, ab | |
| 1271 | abm = bcm | |
| 1272 | else | |
| 1273 | a, b, c = c, a, b | |
| 1274 | ab, bc, ca = ca, ab, bc | |
| 1275 | abm = cam | |
| 1276 | end | |
| 1277 | end | |
| 1278 | ||
| 1279 | local len1 = -ca:Dot(ab)/abm local len2 = abm - len1 local width = (ca + ab.unit*len1).magnitude | |
| 1280 | local maincf = CFrameFromTopBack(a, ab:Cross(bc).unit, -ab.unit) | |
| 1281 | ||
| 1282 | mPart1.Parent = parent | |
| 1283 | mPart1.Size = Vector3.new(1,1,1) | |
| 1284 | mPart1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2) | |
| 1285 | local Mesh = Instance.new("SpecialMesh",mPart1)
| |
| 1286 | Mesh.MeshType = "Wedge" | |
| 1287 | Mesh.Scale = Vector3.new(0.005, width, len1) | |
| 1288 | ||
| 1289 | mPart2.Parent = parent | |
| 1290 | mPart2.Size = Vector3.new(1,1,1) | |
| 1291 | mPart2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2) | |
| 1292 | local Mesh = Instance.new("SpecialMesh",mPart2)
| |
| 1293 | Mesh.MeshType = "Wedge" | |
| 1294 | Mesh.Scale = Vector3.new(0.005, width, len2) | |
| 1295 | end | |
| 1296 | ||
| 1297 | function this:SetProperty(prop, value) | |
| 1298 | mPart1[prop] = value | |
| 1299 | mPart2[prop] = value | |
| 1300 | end | |
| 1301 | ||
| 1302 | function this:GetProperty(prop) | |
| 1303 | return mPart1[prop] | |
| 1304 | end | |
| 1305 | ||
| 1306 | this:Set(a, b, c) | |
| 1307 | function this:Destroy() | |
| 1308 | mPart1:Destroy() | |
| 1309 | mPart2:Destroy() | |
| 1310 | end | |
| 1311 | return this | |
| 1312 | end | |
| 1313 | function CreateTrail(Adornee, Axis) | |
| 1314 | local Axis = Axis or "X" | |
| 1315 | ||
| 1316 | local trail = {}
| |
| 1317 | trail.Triangles = {}
| |
| 1318 | trail.Adornee = Adornee | |
| 1319 | trail.Axis = Axis | |
| 1320 | ||
| 1321 | local L1, L2 | |
| 1322 | ||
| 1323 | function trail:Fade(speed) | |
| 1324 | local speed = speed or 0.01 | |
| 1325 | ||
| 1326 | for n, v in pairs(trail.Triangles) do | |
| 1327 | v:SetProperty("Transparency", v:GetProperty("Transparency") + speed)
| |
| 1328 | if v:GetProperty("Transparency") >= 1 then
| |
| 1329 | v:Destroy() | |
| 1330 | ||
| 1331 | table.remove(trail.Triangles, n) | |
| 1332 | end | |
| 1333 | end | |
| 1334 | end | |
| 1335 | ||
| 1336 | function trail:Update() | |
| 1337 | local adornee = trail.Adornee | |
| 1338 | ||
| 1339 | local axis = trail.Axis | |
| 1340 | local Size = Vector3.new((axis == "X" and adornee.Size.X or 0), (axis == "Y" and adornee.Size.Y or 0), (axis == "Z" and adornee.Size.Z or 0)) | |
| 1341 | local P1 = adornee.CFrame * CFrame.new(Size / 2) | |
| 1342 | local P2 = adornee.CFrame * CFrame.new(Size / -2) | |
| 1343 | ||
| 1344 | if L1 and L2 then | |
| 1345 | table.insert(trail.Triangles, CreateTriangle(adornee, L1.p, L2.p, P1.p)) | |
| 1346 | table.insert(trail.Triangles, CreateTriangle(adornee, P1.p, P2.p, L2.p)) | |
| 1347 | end | |
| 1348 | ||
| 1349 | L1, L2 = P1, P2 | |
| 1350 | end | |
| 1351 | ||
| 1352 | return trail | |
| 1353 | end | |
| 1354 | ||
| 1355 | ||
| 1356 | ||
| 1357 | ||
| 1358 | ||
| 1359 | ||
| 1360 | Player=game:GetService('Players').LocalPlayer
| |
| 1361 | Character=Player.Character | |
| 1362 | Mouse=Player:GetMouse() | |
| 1363 | m=Instance.new('Model',Character)
| |
| 1364 | ||
| 1365 | ||
| 1366 | local function weldBetween(a, b) | |
| 1367 | local weldd = Instance.new("ManualWeld")
| |
| 1368 | weldd.Part0 = a | |
| 1369 | weldd.Part1 = b | |
| 1370 | weldd.C0 = CFrame.new() | |
| 1371 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
| 1372 | weldd.Parent = a | |
| 1373 | return weldd | |
| 1374 | end | |
| 1375 | ||
| 1376 | it=Instance.new | |
| 1377 | ||
| 1378 | function nooutline(part) | |
| 1379 | part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10 | |
| 1380 | end | |
| 1381 | ||
| 1382 | function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size) | |
| 1383 | local fp=it("Part")
| |
| 1384 | fp.Shape=formfactor | |
| 1385 | fp.Parent=parent | |
| 1386 | fp.Reflectance=reflectance | |
| 1387 | fp.Transparency=transparency | |
| 1388 | fp.CanCollide=false | |
| 1389 | fp.Locked=true | |
| 1390 | fp.BrickColor=BrickColor.new(tostring(brickcolor)) | |
| 1391 | fp.Name=name | |
| 1392 | fp.Size=size | |
| 1393 | fp.Position=torso.Position | |
| 1394 | nooutline(fp) | |
| 1395 | fp.Material=material | |
| 1396 | fp:BreakJoints() | |
| 1397 | return fp | |
| 1398 | end | |
| 1399 | ||
| 1400 | ||
| 1401 | function mesh(Mesh,part,meshtype,meshid,offset,scale) | |
| 1402 | local mesh=it(Mesh) | |
| 1403 | mesh.Parent=part | |
| 1404 | if Mesh=="SpecialMesh" then | |
| 1405 | mesh.MeshType=meshtype | |
| 1406 | mesh.MeshId=meshid | |
| 1407 | end | |
| 1408 | mesh.Offset=offset | |
| 1409 | mesh.Scale=scale | |
| 1410 | return mesh | |
| 1411 | end | |
| 1412 | ||
| 1413 | function weld(parent,part0,part1,c0,c1) | |
| 1414 | local weld=it("Weld")
| |
| 1415 | weld.Parent=parent | |
| 1416 | weld.Part0=part0 | |
| 1417 | weld.Part1=part1 | |
| 1418 | weld.C0=c0 | |
| 1419 | weld.C1=c1 | |
| 1420 | return weld | |
| 1421 | end | |
| 1422 | ||
| 1423 | local Spheres = it("Model")
| |
| 1424 | Spheres.Parent=Character | |
| 1425 | ||
| 1426 | ||
| 1427 | Main_Head=part(Enum.PartType.Ball,m,Enum.Material.Neon,0,0.4099999666214,"Mulberry","Handle",Vector3.new(2.96000004, 2.96000004, 2.96000004)) | |
| 1428 | Main_Headweld=weld(m,Character["Torso"],Main_Head,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.00997161865, 0.0349311829, -4.91999435, 1, 0, 0, 0, 0, -1, 0, 1, 0)) | |
| 1429 | MainH_Part=part(Enum.PartType.Ball,Spheres,Enum.Material.Neon,0,0,"Really black","MainH_Part",Vector3.new(1.7518369, 1.7518369, 1.7518369)) | |
| 1430 | MainH_Partweld=weld(m,Main_Head,MainH_Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -0.0603561401, 1.62124634e-005, 1, 0, 0, 0, 1, 0, 0, 0, 1)) | |
| 1431 | ||
| 1432 | ||
| 1433 | Main_RH=part(Enum.PartType.Cylinder,m,Enum.Material.Marble,0,0,"Eggplant","Handle",Vector3.new(0.200000003, 0.929999948, 0.929999948)) | |
| 1434 | Main_RHweld=weld(m,Character["Right Leg"],Main_RH,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.959936023, 0.0700092316, -0.0149731636, 0, 0.999999881, 0, -1, 0, 0, 0, 0, 1)) | |
| 1435 | Part=part(Enum.PartType.Block,m,Enum.Material.Marble,0,0,"Eggplant","Part",Vector3.new(2.08000016, 0.200000003, 0.200000003)) | |
| 1436 | Partweld=weld(m,Main_RH,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.950025678, -0.479959488, 0, 0.999999762, 0, 0, 0, 1, 0, 0, 0, 1)) | |
| 1437 | Part=part(Enum.PartType.Block,m,Enum.Material.Marble,0,0,"Eggplant","Part",Vector3.new(2.08000016, 0.200000003, 0.200000003)) | |
| 1438 | Partweld=weld(m,Main_RH,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.950011849, 0.410047531, 0, 0.999999762, 0, 0, 0, 1, 0, 0, 0, 1)) | |
| 1439 | Sphere_RH1=part(Enum.PartType.Ball,Spheres,Enum.Material.Neon,0,0,"Institutional white","Sphere_RH1",Vector3.new(0.559999943, 0.559999943, 0.559999943)) | |
| 1440 | Sphere_RH1weld=weld(m,Main_RH,Sphere_RH1,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 0.190037251, 0, 0, -1, 0, 0.999999762, 0, 0, 0, 0, 1)) | |
| 1441 | ||
| 1442 | ||
| 1443 | TrailThingy1 = CreateTrail(Sphere_RH1,"Y") | |
| 1444 | ||
| 1445 | ||
| 1446 | ||
| 1447 | Main_LH=part(Enum.PartType.Cylinder,m,Enum.Material.Marble,0,0,"Eggplant","Handle",Vector3.new(0.200000003, 0.929999948, 0.929999948)) | |
| 1448 | Main_LHweld=weld(m,Character["Left Leg"],Main_LH,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.954887033, -7.62939453e-006, -0.0149731636, 0, 0.999999881, 0, -1, 0, 0, 0, 0, 1)) | |
| 1449 | Part=part(Enum.PartType.Block,m,Enum.Material.Marble,0,0,"Eggplant","Part",Vector3.new(2.08000016, 0.200000003, 0.200000003)) | |
| 1450 | Partweld=weld(m,Main_LH,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.95002377, -0.479957581, 0, 0.999999762, 0, 0, 0, 1, 0, 0, 0, 1)) | |
| 1451 | Part=part(Enum.PartType.Block,m,Enum.Material.Marble,0,0,"Eggplant","Part",Vector3.new(2.08000016, 0.200000003, 0.200000003)) | |
| 1452 | Partweld=weld(m,Main_LH,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.950009704, 0.410041809, 0, 0.999999762, 0, 0, 0, 1, 0, 0, 0, 1)) | |
| 1453 | Sphere_LH1=part(Enum.PartType.Ball,Spheres,Enum.Material.Neon,0,0,"Institutional white","Sphere_LH1",Vector3.new(0.559999943, 0.559999943, 0.559999943)) | |
| 1454 | Sphere_LH1weld=weld(m,Main_LH,Sphere_LH1,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 0.190037251, 0, 0, -1, 0, 0.999999762, 0, 0, 0, 0, 1)) | |
| 1455 | ||
| 1456 | TrailThingy2 = CreateTrail(Sphere_LH1,"Y") | |
| 1457 | ||
| 1458 | ||
| 1459 | Main_RW=part(Enum.PartType.Cylinder,m,Enum.Material.Marble,0,0,"Eggplant","Handle",Vector3.new(0.200000003, 0.929999948, 0.929999948)) | |
| 1460 | Main_RWweld=weld(m,Character["Right Arm"],Main_RW,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.964890003, -0.0200252533, -0.0149731636, 0, 0.999999881, 0, -1, 0, 0, 0, 0, 1)) | |
| 1461 | Part=part(Enum.PartType.Block,m,Enum.Material.Marble,0,0,"Eggplant","Part",Vector3.new(2.08000016, 0.200000003, 0.200000003)) | |
| 1462 | Partweld=weld(m,Main_RW,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.950019598, -0.479948044, 0, 0.999999762, 0, 0, 0, 1, 0, 0, 0, 1)) | |
| 1463 | Part=part(Enum.PartType.Block,m,Enum.Material.Marble,0,0,"Eggplant","Part",Vector3.new(2.08000016, 0.200000003, 0.200000003)) | |
| 1464 | Partweld=weld(m,Main_RW,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.950009584, 0.460039902, 0, 0.999999762, 0, 0, 0, 1, 0, 0, 0, 1)) | |
| 1465 | Sphere_RW2=part(Enum.PartType.Ball,Spheres,Enum.Material.Neon,0,0,"Really black","Sphere_LW2",Vector3.new(0.559999943, 0.559999943, 0.559999943)) | |
| 1466 | Sphere_RW2weld=weld(m,Main_RW,Sphere_RW2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -1.94488883, 0, 0, -1, 0, 0.999999762, 0, 0, 0, 0, 1)) | |
| 1467 | Sphere_RW1=part(Enum.PartType.Ball,Spheres,Enum.Material.Neon,0,0,"Really black","Sphere_LW1",Vector3.new(0.559999943, 0.559999943, 0.559999943)) | |
| 1468 | Sphere_RW1weld=weld(m,Main_RW,Sphere_RW1,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 0.190035343, 0, 0, -1, 0, 0.999999762, 0, 0, 0, 0, 1)) | |
| 1469 | ||
| 1470 | ||
| 1471 | TrailThingy3 = CreateTrail(Sphere_RW1,"Y") | |
| 1472 | ||
| 1473 | ||
| 1474 | Main_LW=part(Enum.PartType.Cylinder,m,Enum.Material.Marble,0,0,"Eggplant","Handle",Vector3.new(0.200000003, 0.929999948, 0.929999948)) | |
| 1475 | Main_LWweld=weld(m,Character["Left Arm"],Main_LW,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.974956036, 0.0399856567, -0.0149731636, 0, 0.999999881, 0, -1, 0, 0, 0, 0, 1)) | |
| 1476 | Part=part(Enum.PartType.Block,m,Enum.Material.Marble,0,0,"Eggplant","Part",Vector3.new(2.08000016, 0.200000003, 0.200000003)) | |
| 1477 | Partweld=weld(m,Main_LW,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.950020552, -0.479957581, 0, 0.999999762, 0, 0, 0, 1, 0, 0, 0, 1)) | |
| 1478 | Sphere_LW1=part(Enum.PartType.Ball,Spheres,Enum.Material.Neon,0,0,"Really black","Sphere_LW1",Vector3.new(0.559999943, 0.559999943, 0.559999943)) | |
| 1479 | Sphere_LW1weld=weld(m,Main_LW,Sphere_LW1,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.52587891e-005, 0.190036297, 0, 0, -1, 0, 0.999999762, 0, 0, 0, 0, 1)) | |
| 1480 | Sphere_LW2=part(Enum.PartType.Ball,Spheres,Enum.Material.Neon,0,0,"Really black","Sphere_LW2",Vector3.new(0.559999943, 0.559999943, 0.559999943)) | |
| 1481 | Sphere_LW2weld=weld(m,Main_LW,Sphere_LW2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.52587891e-005, -1.98496461, 0, 0, -1, 0, 0.999999762, 0, 0, 0, 0, 1)) | |
| 1482 | Part=part(Enum.PartType.Block,m,Enum.Material.Marble,0,0,"Eggplant","Part",Vector3.new(2.08000016, 0.200000003, 0.200000003)) | |
| 1483 | Partweld=weld(m,Main_LW,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.950009584, 0.410041809, 0, 0.999999762, 0, 0, 0, 1, 0, 0, 0, 1)) | |
| 1484 | ||
| 1485 | TrailThingy5 = CreateTrail(Sphere_LW1,"Y") | |
| 1486 | ||
| 1487 | ||
| 1488 | local particleemitter = Instance.new("ParticleEmitter", MainH_Part)
| |
| 1489 | PARSI = .5 | |
| 1490 | particleemitter.Lifetime = NumberRange.new(0.2) | |
| 1491 | particleemitter.Speed = NumberRange.new(0) | |
| 1492 | ||
| 1493 | game:service'RunService'.RenderStepped:connect(function() | |
| 1494 | particleemitter.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, PARSI), NumberSequenceKeypoint.new(1, PARSI)})
| |
| 1495 | end) | |
| 1496 | ||
| 1497 | particleemitter.Rate = 1000 | |
| 1498 | particleemitter.Rotation = NumberRange.new(0, 360) | |
| 1499 | particleemitter.LightEmission = 1 | |
| 1500 | particleemitter.Color = ColorSequence.new(Color3.new(0.639216, 0.227451, 1), Color3.new(0.639216, 0.227451, 1)) | |
| 1501 | particleemitter.Texture = "http://www.roblox.com/asset/?id=243098098" | |
| 1502 | particleemitter.LockedToPart = true | |
| 1503 | ||
| 1504 | local particleemitter = Instance.new("ParticleEmitter", MainH_Part)
| |
| 1505 | ||
| 1506 | particleemitter.Lifetime = NumberRange.new(0.2) | |
| 1507 | particleemitter.Speed = NumberRange.new(0) | |
| 1508 | ||
| 1509 | game:service'RunService'.RenderStepped:connect(function() | |
| 1510 | particleemitter.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, PARSI), NumberSequenceKeypoint.new(1, PARSI)})
| |
| 1511 | end) | |
| 1512 | ||
| 1513 | particleemitter.Rate = 1000 | |
| 1514 | particleemitter.Rotation = NumberRange.new(0, 360) | |
| 1515 | particleemitter.LightEmission = 1 | |
| 1516 | particleemitter.Color = ColorSequence.new(Color3.new(0.639216, 0.227451, 1), Color3.new(0.639216, 0.227451, 1)) | |
| 1517 | particleemitter.Texture = "http://www.roblox.com/asset/?id=243098098" | |
| 1518 | particleemitter.LockedToPart = true | |
| 1519 | ||
| 1520 | ||
| 1521 | local particleemitter = Instance.new("ParticleEmitter", MainH_Part)
| |
| 1522 | ||
| 1523 | particleemitter.Lifetime = NumberRange.new(0.2) | |
| 1524 | particleemitter.Speed = NumberRange.new(0) | |
| 1525 | ||
| 1526 | game:service'RunService'.RenderStepped:connect(function() | |
| 1527 | particleemitter.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, PARSI), NumberSequenceKeypoint.new(1, PARSI)})
| |
| 1528 | end) | |
| 1529 | ||
| 1530 | particleemitter.Rate = 1000 | |
| 1531 | particleemitter.Rotation = NumberRange.new(0, 360) | |
| 1532 | particleemitter.LightEmission = 1 | |
| 1533 | particleemitter.Color = ColorSequence.new(Color3.new(0.639216, 0.227451, 1), Color3.new(0.639216, 0.227451, 1)) | |
| 1534 | particleemitter.Texture = "http://www.roblox.com/asset/?id=243098098" | |
| 1535 | particleemitter.LockedToPart = true | |
| 1536 | ||
| 1537 | ||
| 1538 | local particleemitterglow = Instance.new("ParticleEmitter", MainH_Part)
| |
| 1539 | ||
| 1540 | particleemitterglow.Lifetime = NumberRange.new(1) | |
| 1541 | particleemitterglow.Speed = NumberRange.new(0) | |
| 1542 | particleemitterglow.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 10), NumberSequenceKeypoint.new(0.102, 1), NumberSequenceKeypoint.new(0.353, 8.063), NumberSequenceKeypoint.new(0.56, 2.938), NumberSequenceKeypoint.new(0.703, 8.563), NumberSequenceKeypoint.new(1, 0)})
| |
| 1543 | particleemitterglow.Rate = 5 | |
| 1544 | particleemitterglow.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.1, 0.5), NumberSequenceKeypoint.new(0.8, 0.5), NumberSequenceKeypoint.new(1, 1)})
| |
| 1545 | particleemitterglow.Name = "ParticleEmitterGlow" | |
| 1546 | particleemitterglow.LightEmission = 1 | |
| 1547 | particleemitterglow.Color = ColorSequence.new(Color3.new(0.333333, 0, 0), Color3.new(0.333333, 0, 0)) | |
| 1548 | particleemitterglow.Texture = "http://www.roblox.com/asset/?id=243660373" | |
| 1549 | particleemitterglow.LockedToPart = true | |
| 1550 | ||
| 1551 | ||
| 1552 | ||
| 1553 | ||
| 1554 | ||
| 1555 | game:service'RunService'.RenderStepped:connect(function() | |
| 1556 | ||
| 1557 | if anim == "Sprinting" then | |
| 1558 | TrailThingy3:Update() | |
| 1559 | TrailThingy3:Fade(0.2) | |
| 1560 | TrailThingy5:Update() | |
| 1561 | TrailThingy5:Fade(0.2) | |
| 1562 | TrailThingy1:Update() | |
| 1563 | TrailThingy1:Fade(0.2) | |
| 1564 | TrailThingy2:Update() | |
| 1565 | TrailThingy2:Fade(0.2) | |
| 1566 | end | |
| 1567 | ||
| 1568 | if anim ~= "Sprinting" then | |
| 1569 | TrailThingy3:Update() | |
| 1570 | TrailThingy3:Fade(1) | |
| 1571 | TrailThingy5:Update() | |
| 1572 | TrailThingy5:Fade(1) | |
| 1573 | TrailThingy1:Update() | |
| 1574 | TrailThingy1:Fade(1) | |
| 1575 | TrailThingy2:Update() | |
| 1576 | TrailThingy2:Fade(1) | |
| 1577 | end | |
| 1578 | ||
| 1579 | if anim~=lastanim then | |
| 1580 | runtime=0 | |
| 1581 | end | |
| 1582 | lastanim=anim | |
| 1583 | chr.Humanoid.CameraOffset=(rutprt.CFrame:toObjectSpace(hed.CFrame)).p+Vector3.new(0,-1.25,0) | |
| 1584 | syne=syne+.95 | |
| 1585 | if not otheranims and not swimming then | |
| 1586 | if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 1 and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5 | |
| 1587 | anim="Idling" | |
| 1588 | elseif (rutprt.Velocity*Vector3.new(1, 0, 1)).magnitude > 1 and (rutprt.Velocity*Vector3.new(1, 0, 1)).magnitude < RunSpeed-10 and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5 | |
| 1589 | anim="Walking" | |
| 1590 | elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude > RunSpeed-10 and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5 | |
| 1591 | anim="Sprinting" | |
| 1592 | elseif torso.Velocity.y>5 and chr.Humanoid.Jump then | |
| 1593 | anim='Jumping' | |
| 1594 | elseif (torso.Velocity.y < -5) and chr.Humanoid.Jump then | |
| 1595 | anim='Falling' | |
| 1596 | end | |
| 1597 | end | |
| 1598 | ||
| 1599 | if otheranims then return end | |
| 1600 | if anim=="Idling" then | |
| 1601 | idlesineinc=35 | |
| 1602 | rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,3-1*math.cos(syne/10),0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
| 1603 | ||
| 1604 | if not armmovments then | |
| 1605 | rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525+math.cos(syne/idlesineinc)/25,0)*CFrame.Angles(0,0,math.rad(3)),.1) | |
| 1606 | larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525+math.cos(syne/idlesineinc)/25,0)*CFrame.Angles(0,0,math.rad(-3)),.1) | |
| 1607 | end | |
| 1608 | ||
| 1609 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.55, -1.4-0.1*math.cos(syne/10), -0.55) * CFrame.Angles(math.rad(-10+1*math.cos(syne/10)), math.rad(10), math.rad(-0-2*math.cos(syne/10))), 0.4) | |
| 1610 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.55, -2-0.1*math.cos(syne/10), 0) * CFrame.Angles(0, math.rad(-10), math.rad(0+2*math.cos(syne/10))), 0.4) | |
| 1611 | hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/idlesineinc)/50,0)*CFrame.Angles(math.cos(syne/idlesineinc)/40,0,0),.1) | |
| 1612 | end | |
| 1613 | ||
| 1614 | if anim=="Walking" then | |
| 1615 | ||
| 1616 | if not armmovments then | |
| 1617 | rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0) * CFrame.Angles(math.rad(-30), math.rad(0), math.rad(-40)), 0.3) | |
| 1618 | larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)* CFrame.Angles(math.rad(-30), math.rad(0), math.rad(40)), 0.3) | |
| 1619 | end | |
| 1620 | ||
| 1621 | lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.9-math.cos(syne/6)/10,-(math.cos(syne/6)/1.125))*CFrame.Angles(math.cos(syne/6)/1.125,0,math.rad(-2.5)),.1) | |
| 1622 | rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.9-math.cos(syne/6)/10,math.cos(syne/6)/1.125)*CFrame.Angles(-(math.cos(syne/6)/1.125),0,math.rad(2.5)),.1) | |
| 1623 | hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.55+math.cos(syne/20)/50,0)*CFrame.Angles(-math.cos(syne/2.5)/10+math.rad(20),0,0),.1) | |
| 1624 | rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,3+math.cos(syne/2.5)/15,math.cos(syne/2.5))*CFrame.Angles(math.cos(syne/2.5)/10+math.rad(-25),math.cos(syne/2.5)/10,math.cos(syne/4)/20+math.sin(rutprt.RotVelocity.y/2)/4),.1) | |
| 1625 | end | |
| 1626 | ||
| 1627 | if anim=="Sprinting" then | |
| 1628 | ArmsTrail = true | |
| 1629 | ||
| 1630 | if not armmovments then | |
| 1631 | rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(-math.cos(syne/2.5)/10+math.rad(-55),0,math.rad(12.5)),.1) | |
| 1632 | larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(-math.cos(syne/2.5)/10+math.rad(-55),0,math.rad(-12.5)),.1) | |
| 1633 | end | |
| 1634 | ||
| 1635 | lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.6-math.cos(syne/4)/4,-(math.cos(syne/4)*2)-math.rad(10))*CFrame.Angles(math.cos(syne/4)*2+math.rad(10),0,math.rad(-2.5)),.1) | |
| 1636 | rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.6-math.cos(syne/4)/4,math.cos(syne/4)*2-math.rad(10))*CFrame.Angles(-(math.cos(syne/4)*2)+math.rad(10),0,math.rad(2.5)),.1) | |
| 1637 | hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.55+math.cos(syne/20)/50,0)*CFrame.Angles(-math.cos(syne/2.5)/10+math.rad(20),0,0),.1) | |
| 1638 | rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,3+math.cos(syne/2.5)/15,math.cos(syne/2.5))*CFrame.Angles(math.cos(syne/3)/15+math.rad(-40),math.cos(syne/2.5)/10,math.cos(syne/4)/20+math.sin(rutprt.RotVelocity.y/2)/4),.1) | |
| 1639 | ArmsTrail = false | |
| 1640 | end | |
| 1641 | ||
| 1642 | if anim=="Jumping" then | |
| 1643 | ||
| 1644 | if not armmovments then | |
| 1645 | rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(50)),.1) | |
| 1646 | larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(-50)),.1) | |
| 1647 | end | |
| 1648 | ||
| 1649 | lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.4,0)*CFrame.Angles(math.rad(-17.5),0,math.rad(-2.5)),.1) | |
| 1650 | rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.1,-.1)*CFrame.Angles(math.rad(-17.5),0,math.rad(2.5)),.1) | |
| 1651 | hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/20)/50,0)*CFrame.Angles(math.cos(syne/20)/40,0,0),.1) | |
| 1652 | rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/20)/20,0)*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(0)),.1) | |
| 1653 | end | |
| 1654 | ||
| 1655 | if anim=="Falling" then | |
| 1656 | ||
| 1657 | if not armmovments then | |
| 1658 | rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(70)),.035) | |
| 1659 | larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(-70)),.035) | |
| 1660 | end | |
| 1661 | ||
| 1662 | lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.2,0)*CFrame.Angles(math.rad(-14),0,math.rad(-2.5)),.035) | |
| 1663 | rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(math.rad(0),0,math.rad(2.5)),.035) | |
| 1664 | hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5,-.3)*CFrame.Angles(math.rad(-40),0,0),.035) | |
| 1665 | rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/20)/20,0)*CFrame.Angles(math.rad(10),math.rad(0),math.rad(0)),.035) | |
| 1666 | end | |
| 1667 | ||
| 1668 | ||
| 1669 | ||
| 1670 | ||
| 1671 | if runnin and not otheranims and not swimming then | |
| 1672 | chr.Humanoid.WalkSpeed=RunSpeed | |
| 1673 | elseif not runnin and not otheranims and not swimming then | |
| 1674 | chr.Humanoid.WalkSpeed=WlkSpeed | |
| 1675 | end | |
| 1676 | end) | |
| 1677 | ||
| 1678 | ||
| 1679 | --[[]]----[[Moves]]----[[]]-- | |
| 1680 | attackone = function() | |
| 1681 | ||
| 1682 | attack = true | |
| 1683 | armmovments=true | |
| 1684 | ||
| 1685 | for i = 0, 1, 0.13 do | |
| 1686 | swait() | |
| 1687 | rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0) * CFrame.Angles(math.rad(160), math.rad(0), math.rad(-40)), 0.3) | |
| 1688 | larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)* CFrame.Angles(math.rad(160), math.rad(0), math.rad(40)), 0.3) | |
| 1689 | PARSI = PARSI + i/2--i + i/.5 | |
| 1690 | end | |
| 1691 | wait(1) | |
| 1692 | for i = 0, 1, 0.13 do | |
| 1693 | swait() | |
| 1694 | PARSI = PARSI - i/2--i + i/.5 | |
| 1695 | end | |
| 1696 | ||
| 1697 | attack = false | |
| 1698 | armmovments=false | |
| 1699 | end | |
| 1700 | ||
| 1701 | ||
| 1702 | ||
| 1703 | ||
| 1704 | attacktwo = function() | |
| 1705 | attack = true | |
| 1706 | armmovments=true | |
| 1707 | ||
| 1708 | for i = 0, 20, 0.13 do | |
| 1709 | swait() | |
| 1710 | rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0) * CFrame.Angles(math.rad(180), math.rad(0), math.rad(0)), 0.3) | |
| 1711 | MagniDamage(RootPart, 12, true, 1, 2, true, 10, "Compensate-Knockdown", 0.01, false, 0, false, _, "", "") | |
| 1712 | local rnum = 20 | |
| 1713 | local Rand1, Rand2, Rand3, Rand4 = {rand(-rnum, rnum), rand(-rnum, rnum), rand(-rnum, rnum)}, {rand(-rnum, rnum), rand(-rnum, rnum), rand(-rnum, rnum)}, {rand(-360, 360), rand(-360, 360), rand(-360, 360)}, {rand(-rnum, rnum), rand(-rnum, rnum), rand(-rnum, rnum)}
| |
| 1714 | MagicSpikeBall(BrickColor.new("Royal purple"), "Neon", rarm.CFrame + Vector3.new(0,15,0), 0, 0, 0, 0.3, 0.3, 0.3, 0.1)
| |
| 1715 | MagicCircle(BrickColor.new("Really black"), "Neon", rarm.CFrame + Vector3.new(0,15,0), 0, 0, 0, 0.3, 0.3, 0.3, 0.1)
| |
| 1716 | end | |
| 1717 | ||
| 1718 | for i = 0, 1, 0.1 do | |
| 1719 | swait() | |
| 1720 | ||
| 1721 | end | |
| 1722 | ||
| 1723 | attack = false | |
| 1724 | armmovments=false | |
| 1725 | end | |
| 1726 | ||
| 1727 | ||
| 1728 | ||
| 1729 | ||
| 1730 | ||
| 1731 | attackthree = function() | |
| 1732 | ||
| 1733 | attack = true | |
| 1734 | otheranims=true | |
| 1735 | ||
| 1736 | for i = 0, 1, 0.13 do | |
| 1737 | swait() | |
| 1738 | ||
| 1739 | end | |
| 1740 | ||
| 1741 | for i = 0, 1, 0.1 do | |
| 1742 | swait() | |
| 1743 | ||
| 1744 | end | |
| 1745 | otheranims=false | |
| 1746 | attack = false | |
| 1747 | ||
| 1748 | end | |
| 1749 | ||
| 1750 | ||
| 1751 | ||
| 1752 | ||
| 1753 | Untimatum = function() | |
| 1754 | ||
| 1755 | attack = true | |
| 1756 | otheranims=true | |
| 1757 | ||
| 1758 | ||
| 1759 | ||
| 1760 | otheranims=false | |
| 1761 | attack = false | |
| 1762 | end | |
| 1763 | --[[]]----[[Moves]]----[[]]-- | |
| 1764 | ||
| 1765 | ||
| 1766 | for i = 0, 1, 0.1 do | |
| 1767 | swait() | |
| 1768 | MagicBlock(BrickColor.new("Really black"), "Neon", RootPart.CFrame * Cf(0, -1.15, 0), 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
| |
| 1769 | MagicBlock(BrickColor.new("Really black"), "Neon", RootPart.CFrame * Cf(0, -1.15, 0), 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
| |
| 1770 | MagicBlock(BrickColor.new("Really black"), "Neon", RootPart.CFrame * Cf(0, -1.15, 0), 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
| |
| 1771 | ||
| 1772 | MagicBlock(BrickColor.new("Royal purple"), "Neon", RootPart.CFrame * Cf(0, -1.15, 0), 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
| |
| 1773 | MagicCircle(BrickColor.new("Royal purple"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
| |
| 1774 | MagicCircle(BrickColor.new("Royal purple"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
| |
| 1775 | MagicCircle(BrickColor.new("Royal purple"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
| |
| 1776 | MagicCircle(BrickColor.new("Royal purple"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
| |
| 1777 | ||
| 1778 | MagicBlock(BrickColor.new("Royal purple"), "SmoothPlastic", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
| |
| 1779 | MagicBlock(BrickColor.new("Royal purple"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.02)
| |
| 1780 | ||
| 1781 | MagicSpikeBall(BrickColor.new("Royal purple"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
| |
| 1782 | MagicSpikeBall(BrickColor.new("Royal purple"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
| |
| 1783 | ||
| 1784 | MagicCircle(BrickColor.new("Really black"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
| |
| 1785 | MagicCircle(BrickColor.new("Really black"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
| |
| 1786 | end | |
| 1787 | ||
| 1788 | function Lightning(Part0,Part1,Times,Offset,Color,Thickness,Trans) | |
| 1789 | local magz = (Part0 - Part1).magnitude | |
| 1790 | local curpos = Part0 | |
| 1791 | local trz = {-Offset,Offset}
| |
| 1792 | for i=1,Times do | |
| 1793 | local li = Instance.new("Part", torso)
| |
| 1794 | li.Name = "Lightning" | |
| 1795 | li.TopSurface =0 | |
| 1796 | li.Material = "Neon" | |
| 1797 | li.BottomSurface = 0 | |
| 1798 | li.Anchored = true | |
| 1799 | li.Locked = true | |
| 1800 | li.Transparency = Trans or 0.4 | |
| 1801 | li.BrickColor = BrickColor.new(Color) | |
| 1802 | li.formFactor = "Custom" | |
| 1803 | li.CanCollide = false | |
| 1804 | li.Size = Vector3.new(Thickness,Thickness,magz/Times) | |
| 1805 | local Offzet = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)]) | |
| 1806 | local trolpos = CFrame.new(curpos,Part1)*CFrame.new(0,0,magz/Times).p+Offzet | |
| 1807 | if Times == i then | |
| 1808 | local magz2 = (curpos - Part1).magnitude | |
| 1809 | li.Size = Vector3.new(Thickness,Thickness,magz2) | |
| 1810 | li.CFrame = CFrame.new(curpos,Part1)*CFrame.new(0,0,-magz2/2) | |
| 1811 | else | |
| 1812 | li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2) | |
| 1813 | end | |
| 1814 | curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p | |
| 1815 | game.Debris:AddItem(li,.1) | |
| 1816 | end | |
| 1817 | end | |
| 1818 | ||
| 1819 | BodyParts = {} -- Parts to emit lightning effects from
| |
| 1820 | for _, v in pairs(Spheres:GetChildren()) do | |
| 1821 | if v:IsA("Part") then
| |
| 1822 | table.insert(BodyParts, v) | |
| 1823 | end | |
| 1824 | end | |
| 1825 | ||
| 1826 | Bounding = {} -- Calculate the bounding boxes
| |
| 1827 | for _, v in pairs(BodyParts) do | |
| 1828 | local temp = {X=nil, Y=nil, Z=nil}
| |
| 1829 | temp.X = v.Size.X/2 * 10 | |
| 1830 | temp.Y = v.Size.Y/2 * 10 | |
| 1831 | temp.Z = v.Size.Z/2 * 10 | |
| 1832 | Bounding[v.Name] = temp | |
| 1833 | --table.insert(Bounding, v.Name, temp) | |
| 1834 | end | |
| 1835 | ||
| 1836 | while wait(math.random(1,10)/10) do -- Emit the Lightning effects randomly | |
| 1837 | local Body1 = BodyParts[math.random(#BodyParts)] | |
| 1838 | local Body2 = BodyParts[math.random(#BodyParts)] | |
| 1839 | local Pos1 = Vector3.new( | |
| 1840 | math.random(-Bounding[Body1.Name].X, Bounding[Body1.Name].X)/10, | |
| 1841 | math.random(-Bounding[Body1.Name].Y, Bounding[Body1.Name].Y)/10, | |
| 1842 | math.random(-Bounding[Body1.Name].Z, Bounding[Body1.Name].Z)/10 | |
| 1843 | ) | |
| 1844 | local Pos2 = Vector3.new( | |
| 1845 | math.random(-Bounding[Body2.Name].X, Bounding[Body2.Name].X)/10, | |
| 1846 | math.random(-Bounding[Body2.Name].Y, Bounding[Body2.Name].Y)/10, | |
| 1847 | math.random(-Bounding[Body2.Name].Z, Bounding[Body2.Name].Z)/10 | |
| 1848 | ) | |
| 1849 | local SPos1 = Body1.Position + Pos1 | |
| 1850 | local SPos2 = Body2.Position + Pos2 | |
| 1851 | Lightning(SPos1, SPos2, 6, 5, "Dark indigo", .03, .56) | |
| 1852 | end | |
| 1853 | ||
| 1854 | ||
| 1855 | if #Effects > 0 then | |
| 1856 | for e = 1, #Effects do | |
| 1857 | if Effects[e] ~= nil then | |
| 1858 | local Thing = Effects[e] | |
| 1859 | if Thing ~= nil then | |
| 1860 | local Part = Thing[1] | |
| 1861 | local Mode = Thing[2] | |
| 1862 | local Delay = Thing[3] | |
| 1863 | local IncX = Thing[4] | |
| 1864 | local IncY = Thing[5] | |
| 1865 | local IncZ = Thing[6] | |
| 1866 | if Thing[1].Transparency <= 1 then | |
| 1867 | if Thing[2] == "Block1" then | |
| 1868 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
| 1869 | Mesh = Thing[1].Mesh | |
| 1870 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
| 1871 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1872 | elseif Thing[2] == "Block2" then | |
| 1873 | Thing[1].CFrame = Thing[1].CFrame | |
| 1874 | Mesh = Thing[7] | |
| 1875 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
| 1876 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1877 | elseif Thing[2] == "Cylinder" then | |
| 1878 | Mesh = Thing[1].Mesh | |
| 1879 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
| 1880 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1881 | elseif Thing[2] == "Blood" then | |
| 1882 | Mesh = Thing[7] | |
| 1883 | Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, .5, 0) | |
| 1884 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
| 1885 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1886 | elseif Thing[2] == "Elec" then | |
| 1887 | Mesh = Thing[1].Mesh | |
| 1888 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9]) | |
| 1889 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1890 | elseif Thing[2] == "Disappear" then | |
| 1891 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1892 | elseif Thing[2] == "Shatter" then | |
| 1893 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1894 | Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0) | |
| 1895 | Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0) | |
| 1896 | Thing[6] = Thing[6] + Thing[5] | |
| 1897 | end | |
| 1898 | else | |
| 1899 | Part.Parent = nil | |
| 1900 | table.remove(Effects, e) | |
| 1901 | end | |
| 1902 | end | |
| 1903 | end | |
| 1904 | end | |
| 1905 | end |