SHOW:
|
|
- or go back to the newest paste.
| 1 | --]] | |
| 2 | --https://github.com/Mokiros/roblox-FE-compatibility | |
| 3 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
| |
| 4 | local Player,Mouse,mouse,UserInputService,ContextActionService = owner | |
| 5 | local RealPlayer = Player | |
| 6 | do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
| |
| 7 | ||
| 8 | ||
| 9 | --[[ Declarations ]]-- | |
| 10 | --Credits to whoever made the script, I only made edits. Edit list below: | |
| 11 | --Can use attacks instead of it clicking. (z, x, c) | |
| 12 | --Kill others keybind (r) | |
| 13 | --Jump yourself (f) (Some scripts on sb get you stuck) | |
| 14 | --Set walkspeed, jump height, gravity, and ambient. (Q = dark, E = bright) | |
| 15 | --^^ Dark = better jump height, gravity, and dark, bright = opposite. | |
| 16 | --Might make more, deleted my earlier edit, the spike attack (c, drew players toward me) | |
| 17 | local a = game.Players.LocalPlayer | |
| 18 | local mouse = a:GetMouse() | |
| 19 | wait(0.05) | |
| 20 | game.Workspace[a.Name].Head.face:Destroy() | |
| 21 | game.Workspace[a.Name].Humanoid.HealthDisplayType = "AlwaysOff" | |
| 22 | game.Workspace[a.Name].Humanoid.HealthDisplayDistance = "0" | |
| 23 | game.Workspace[a.Name].Humanoid.DisplayDistanceType = "None" | |
| 24 | ||
| 25 | mouse.KeyDown:connect(function(key) | |
| 26 | if key == "t" then | |
| 27 | print(mouse.Target.Name) | |
| 28 | print(mouse.Target.Parent.Name) | |
| 29 | print(mouse.Target.Parent.Parent.Name) | |
| 30 | end | |
| 31 | end) | |
| 32 | ||
| 33 | mouse.KeyDown:connect(function(key) | |
| 34 | if key == "g" then | |
| 35 | if mouse.Target.Name == "Base" then | |
| 36 | else | |
| 37 | mouse.Target:Destroy() | |
| 38 | end | |
| 39 | end | |
| 40 | end) | |
| 41 | ||
| 42 | ||
| 43 | mouse.KeyDown:connect(function(key) | |
| 44 | if key == "q" then | |
| 45 | local p = game.Workspace[a.Name] | |
| 46 | for i,v in pairs(p:GetChildren()) do | |
| 47 | if v:IsA("Part") then
| |
| 48 | v.Transparency = 1 | |
| 49 | p.Cloak.Transparency = 1 | |
| 50 | p.Head.BillboardGui.Enabled = false | |
| 51 | game.Lighting.OutdoorAmbient = Color3.new(0, 0, 0) | |
| 52 | game.Lighting.Brightness = 0 | |
| 53 | game.Lighting.Ambient = Color3.new(0, 0, 0) | |
| 54 | p.Humanoid.WalkSpeed = 100 | |
| 55 | p.Humanoid.JumpPower = 75 | |
| 56 | game.Workspace.Gravity = 80 | |
| 57 | ||
| 58 | end | |
| 59 | end | |
| 60 | ||
| 61 | end | |
| 62 | end) | |
| 63 | ||
| 64 | mouse.KeyDown:connect(function(key) | |
| 65 | if key == "e" then | |
| 66 | local p = game.Workspace[a.Name] | |
| 67 | for i,v in pairs(p:GetChildren()) do | |
| 68 | if v:IsA("Part") then
| |
| 69 | v.Transparency = 0 | |
| 70 | p.Cloak.Transparency = 0 | |
| 71 | p.Reference.Transparency = 1 | |
| 72 | p.HumanoidRootPart.Transparency = 1 | |
| 73 | p.Head.BillboardGui.Enabled = true | |
| 74 | game.Lighting.OutdoorAmbient = Color3.new(127, 127, 127) | |
| 75 | game.Lighting.Brightness = 1 | |
| 76 | game.Lighting.Ambient = Color3.new(0, 0, 0) | |
| 77 | p.Humanoid.WalkSpeed = 21 | |
| 78 | p.Humanoid.JumpPower = 50 | |
| 79 | game.Workspace.Gravity = 100 | |
| 80 | end | |
| 81 | end | |
| 82 | ||
| 83 | end | |
| 84 | end) | |
| 85 | ||
| 86 | mouse.KeyDown:connect(function(key) | |
| 87 | if key == "r" then | |
| 88 | for i,v in pairs(game.Players:GetChildren()) do | |
| 89 | if v.Name == a.Name then | |
| 90 | else | |
| 91 | if v:IsA("Player") then
| |
| 92 | ||
| 93 | game.Workspace[v.Name].Humanoid.Health = 0 | |
| 94 | end | |
| 95 | end | |
| 96 | end | |
| 97 | end | |
| 98 | end) | |
| 99 | ||
| 100 | looop = false | |
| 101 | ||
| 102 | mouse.KeyDown:connect(function(key) | |
| 103 | if key == "y" then | |
| 104 | looop = true | |
| 105 | while wait() do | |
| 106 | if looop == true then | |
| 107 | game.Workspace[a.Name].Humanoid.Sit = true | |
| 108 | wait(0.1) | |
| 109 | else | |
| 110 | ||
| 111 | end | |
| 112 | end | |
| 113 | end | |
| 114 | end) | |
| 115 | ||
| 116 | ||
| 117 | mouse.KeyDown:connect(function(key) | |
| 118 | if key == "h" then | |
| 119 | looop = false | |
| 120 | end | |
| 121 | end) | |
| 122 | ||
| 123 | mouse.KeyDown:connect(function(key) | |
| 124 | if key == "n" then | |
| 125 | mouse.Target.Anchored = true | |
| 126 | end | |
| 127 | end) | |
| 128 | ||
| 129 | mouse.KeyDown:connect(function(key) | |
| 130 | if key == "j" then | |
| 131 | mouse.Target.CanCollide = true | |
| 132 | end | |
| 133 | end) | |
| 134 | ||
| 135 | mouse.KeyDown:connect(function(key) | |
| 136 | if key == "u" then | |
| 137 | mouse.Target.CanCollide = false | |
| 138 | end | |
| 139 | end) | |
| 140 | ||
| 141 | ||
| 142 | mouse.KeyDown:connect(function(key) | |
| 143 | if key == "m" then | |
| 144 | mouse.Target.Anchored = false | |
| 145 | end | |
| 146 | end) | |
| 147 | ||
| 148 | mouse.KeyDown:connect(function(key) | |
| 149 | if key == "v" then | |
| 150 | for i,v in pairs(game.Players:GetChildren()) do | |
| 151 | if v:IsA("Player") then
| |
| 152 | if v.Name == a.Name then | |
| 153 | else | |
| 154 | game.Workspace[v.Name].Humanoid.WalkToPoint = game.Workspace[a.Name].Torso.Position | |
| 155 | end | |
| 156 | end | |
| 157 | end | |
| 158 | end | |
| 159 | end) | |
| 160 | ||
| 161 | ||
| 162 | ||
| 163 | ||
| 164 | mouse.KeyDown:connect(function(key) | |
| 165 | if key == "f" then | |
| 166 | game.Workspace[a.Name].Humanoid.Jump = true | |
| 167 | ||
| 168 | end | |
| 169 | end) | |
| 170 | ||
| 171 | mouse.KeyDown:connect(function(key) | |
| 172 | if key == "b" then | |
| 173 | game.Workspace[a.Name].Torso.CFrame = mouse.Hit | |
| 174 | end | |
| 175 | end) | |
| 176 | ||
| 177 | ||
| 178 | wait(.0000000000000000000001) | |
| 179 | local Player = game:GetService("Players").LocalPlayer
| |
| 180 | local Character = Player.Character | |
| 181 | local Head = Character.Head | |
| 182 | local Torso = Character.Torso | |
| 183 | local Right_Arm = Character["Right Arm"] | |
| 184 | local Right_Leg = Character["Right Leg"] | |
| 185 | local Left_Arm = Character["Left Arm"] | |
| 186 | local Left_Leg = Character["Left Leg"] | |
| 187 | local Humanoid = Character.Humanoid | |
| 188 | local Animation = "Idle" | |
| 189 | local Mouse = Player:GetMouse() | |
| 190 | local LeftShoulder = Torso["Left Shoulder"] | |
| 191 | local Left_Hip = Torso["Left Hip"] | |
| 192 | local RightShoulder = Torso["Right Shoulder"] | |
| 193 | local Right_Hip = Torso["Right Hip"] | |
| 194 | local Root = Character.HumanoidRootPart | |
| 195 | local RootJoint = Root.RootJoint | |
| 196 | local Attacking = false | |
| 197 | local CanAttack = true | |
| 198 | local Anim = "Idle" | |
| 199 | local Combo = 1 | |
| 200 | local Blocking = false | |
| 201 | local MaxDestruction = 1000 | |
| 202 | local Destruction = 0 | |
| 203 | local MaxBlock = 100 | |
| 204 | local Effects = {}
| |
| 205 | local Color = "Bright yellow" | |
| 206 | local Invert = false | |
| 207 | local Idle = 0 | |
| 208 | local Equipped = false | |
| 209 | local Running = false | |
| 210 | local Unseathed = false | |
| 211 | local Shard = "None" | |
| 212 | ||
| 213 | Humanoid.MaxHealth = math.huge | |
| 214 | Humanoid.Health = math.huge | |
| 215 | ||
| 216 | ||
| 217 | ||
| 218 | local NewGuiPart1 = Instance.new("ScreenGui")
| |
| 219 | NewGuiPart1.Parent = game.Players.LocalPlayer.PlayerGui | |
| 220 | NewGuiPart1.Name = "Savior" | |
| 221 | ------- | |
| 222 | local NewGuiPart2 = Instance.new("Frame")
| |
| 223 | NewGuiPart2.Active = true | |
| 224 | NewGuiPart2.BackgroundColor3 = Color3.new(0.760784, 0.760784, 0) | |
| 225 | NewGuiPart2.BorderColor3 = Color3.new(1, 1, 1) | |
| 226 | NewGuiPart2.Size = UDim2.new(0, 350, 0, 300) | |
| 227 | NewGuiPart2.Draggable = true | |
| 228 | NewGuiPart2.Parent = NewGuiPart1 | |
| 229 | ------- | |
| 230 | local NewGuiPart3 = Instance.new("TextLabel")
| |
| 231 | NewGuiPart3.BackgroundTransparency = 1 | |
| 232 | NewGuiPart3.Position = UDim2.new(0.200000003, 0, 0, 0) | |
| 233 | NewGuiPart3.Size = UDim2.new(0, 200, 0, 50) | |
| 234 | NewGuiPart3.Font = Enum.Font.Highway | |
| 235 | NewGuiPart3.FontSize = Enum.FontSize.Size14 | |
| 236 | NewGuiPart3.Text = "Superior Power List" | |
| 237 | NewGuiPart3.TextColor3 = Color3.new(0.333333, 0, 1) | |
| 238 | NewGuiPart3.TextStrokeColor3 = Color3.new(1, 1, 1) | |
| 239 | NewGuiPart3.Parent = NewGuiPart2 | |
| 240 | ------- | |
| 241 | local NewGuiPart4 = Instance.new("TextLabel")
| |
| 242 | NewGuiPart4.BackgroundTransparency = 1 | |
| 243 | NewGuiPart4.Position = UDim2.new(0, 0, 0.200000003, 0) | |
| 244 | NewGuiPart4.Size = UDim2.new(0, 200, 0, 50) | |
| 245 | NewGuiPart4.Font = Enum.Font.Highway | |
| 246 | NewGuiPart4.FontSize = Enum.FontSize.Size14 | |
| 247 | NewGuiPart4.Text = "Q = Night Mode E = Day mode" | |
| 248 | NewGuiPart4.TextColor3 = Color3.new(0.333333, 0, 1) | |
| 249 | NewGuiPart4.TextStrokeColor3 = Color3.new(1, 1, 1) | |
| 250 | NewGuiPart4.TextWrapped = true | |
| 251 | NewGuiPart4.Parent = NewGuiPart2 | |
| 252 | ------- | |
| 253 | local NewGuiPart5 = Instance.new("TextLabel")
| |
| 254 | NewGuiPart5.BackgroundTransparency = 1 | |
| 255 | NewGuiPart5.Position = UDim2.new(0, 0, 0.5, 0) | |
| 256 | NewGuiPart5.Size = UDim2.new(0, 200, 0, 50) | |
| 257 | NewGuiPart5.Font = Enum.Font.Highway | |
| 258 | NewGuiPart5.FontSize = Enum.FontSize.Size14 | |
| 259 | NewGuiPart5.Text = "B = Relay G = Eradicate part" | |
| 260 | NewGuiPart5.TextColor3 = Color3.new(0.333333, 0, 1) | |
| 261 | NewGuiPart5.TextStrokeColor3 = Color3.new(1, 1, 1) | |
| 262 | NewGuiPart5.TextWrapped = true | |
| 263 | NewGuiPart5.Parent = NewGuiPart2 | |
| 264 | ------- | |
| 265 | local NewGuiPart6 = Instance.new("TextLabel")
| |
| 266 | NewGuiPart6.BackgroundTransparency = 1 | |
| 267 | NewGuiPart6.Position = UDim2.new(0, 0, 0.349999994, 0) | |
| 268 | NewGuiPart6.Size = UDim2.new(0, 200, 0, 50) | |
| 269 | NewGuiPart6.Font = Enum.Font.Highway | |
| 270 | NewGuiPart6.FontSize = Enum.FontSize.Size14 | |
| 271 | NewGuiPart6.Text = "T = Part identity R = Eradicate others" | |
| 272 | NewGuiPart6.TextColor3 = Color3.new(0.333333, 0, 1) | |
| 273 | NewGuiPart6.TextStrokeColor3 = Color3.new(1, 1, 1) | |
| 274 | NewGuiPart6.TextWrapped = true | |
| 275 | NewGuiPart6.Parent = NewGuiPart2 | |
| 276 | ------- | |
| 277 | local NewGuiPart7 = Instance.new("TextLabel")
| |
| 278 | NewGuiPart7.BackgroundTransparency = 1 | |
| 279 | NewGuiPart7.Position = UDim2.new(0.300000012, 0, 0.200000003, 0) | |
| 280 | NewGuiPart7.Size = UDim2.new(0, 200, 0, 50) | |
| 281 | NewGuiPart7.Font = Enum.Font.Highway | |
| 282 | NewGuiPart7.FontSize = Enum.FontSize.Size14 | |
| 283 | NewGuiPart7.Text = " V = Followers demise F = Jump" | |
| 284 | NewGuiPart7.TextColor3 = Color3.new(0.333333, 0, 1) | |
| 285 | NewGuiPart7.TextStrokeColor3 = Color3.new(1, 1, 1) | |
| 286 | NewGuiPart7.TextWrapped = true | |
| 287 | NewGuiPart7.Parent = NewGuiPart2 | |
| 288 | ------- | |
| 289 | local NewGuiPart8 = Instance.new("TextLabel")
| |
| 290 | NewGuiPart8.BackgroundTransparency = 1 | |
| 291 | NewGuiPart8.Position = UDim2.new(0.330000013, 0, 0.349999994, 0) | |
| 292 | NewGuiPart8.Size = UDim2.new(0, 200, 0, 50) | |
| 293 | NewGuiPart8.Font = Enum.Font.Highway | |
| 294 | NewGuiPart8.FontSize = Enum.FontSize.Size14 | |
| 295 | NewGuiPart8.Text = "Y = True jump H = Mortal jump" | |
| 296 | NewGuiPart8.TextColor3 = Color3.new(0.333333, 0, 1) | |
| 297 | NewGuiPart8.TextStrokeColor3 = Color3.new(1, 1, 1) | |
| 298 | NewGuiPart8.TextWrapped = true | |
| 299 | NewGuiPart8.Parent = NewGuiPart2 | |
| 300 | ------- | |
| 301 | local NewGuiPart9 = Instance.new("TextLabel")
| |
| 302 | NewGuiPart9.BackgroundTransparency = 1 | |
| 303 | NewGuiPart9.Position = UDim2.new(0.330000013, 0, 0.5, 0) | |
| 304 | NewGuiPart9.Size = UDim2.new(0, 200, 0, 50) | |
| 305 | NewGuiPart9.Font = Enum.Font.Highway | |
| 306 | NewGuiPart9.FontSize = Enum.FontSize.Size14 | |
| 307 | NewGuiPart9.Text = "N = Anchor M = Unanchor " | |
| 308 | NewGuiPart9.TextColor3 = Color3.new(0.333333, 0, 1) | |
| 309 | NewGuiPart9.TextStrokeColor3 = Color3.new(1, 1, 1) | |
| 310 | NewGuiPart9.TextWrapped = true | |
| 311 | NewGuiPart9.Parent = NewGuiPart2 | |
| 312 | ------- | |
| 313 | local NewGuiPart10 = Instance.new("TextLabel")
| |
| 314 | NewGuiPart10.BackgroundTransparency = 1 | |
| 315 | NewGuiPart10.Position = UDim2.new(0, 0, 0.649999976, 0) | |
| 316 | NewGuiPart10.Size = UDim2.new(0, 200, 0, 50) | |
| 317 | NewGuiPart10.Font = Enum.Font.Highway | |
| 318 | NewGuiPart10.FontSize = Enum.FontSize.Size14 | |
| 319 | NewGuiPart10.Text = "J = Real brick U = False brick" | |
| 320 | NewGuiPart10.TextColor3 = Color3.new(0.333333, 0, 1) | |
| 321 | NewGuiPart10.TextStrokeColor3 = Color3.new(1, 1, 1) | |
| 322 | NewGuiPart10.TextWrapped = true | |
| 323 | NewGuiPart10.Parent = NewGuiPart2 | |
| 324 | ------- | |
| 325 | local NewGuiPart11 = Instance.new("TextLabel")
| |
| 326 | NewGuiPart11.BackgroundTransparency = 1 | |
| 327 | NewGuiPart11.Position = UDim2.new(0.349999994, 0, 0.649999976, 0) | |
| 328 | NewGuiPart11.Size = UDim2.new(0, 200, 0, 50) | |
| 329 | NewGuiPart11.Font = Enum.Font.Highway | |
| 330 | NewGuiPart11.FontSize = Enum.FontSize.Size14 | |
| 331 | NewGuiPart11.Text = "Z = Superior Punch X = Ground Smash C = Spikes of Retribution" | |
| 332 | NewGuiPart11.TextColor3 = Color3.new(0.333333, 0, 1) | |
| 333 | NewGuiPart11.TextStrokeColor3 = Color3.new(1, 1, 1) | |
| 334 | NewGuiPart11.TextWrapped = true | |
| 335 | NewGuiPart11.Parent = NewGuiPart2 | |
| 336 | ||
| 337 | ||
| 338 | local WorldEaterTheme = Instance.new("Sound",Character)
| |
| 339 | WorldEaterTheme.Name = "WorldEaterTheme" | |
| 340 | WorldEaterTheme.Looped = true | |
| 341 | WorldEaterTheme.SoundId = "http://www.roblox.com/asset?id=698734353" | |
| 342 | WorldEaterTheme:Play() | |
| 343 | WorldEaterTheme.Volume = 3 | |
| 344 | ||
| 345 | Left_Shoulder = Instance.new("Weld", Torso)
| |
| 346 | Left_Shoulder.Part0 = Torso | |
| 347 | Left_Shoulder.Part1 = Left_Arm | |
| 348 | Left_Shoulder.Name = "Left Shoulder" | |
| 349 | Left_Shoulder.C0 = CFrame.new(-1.5,0,0) | |
| 350 | ||
| 351 | Right_Shoulder = Instance.new("Weld", Torso)
| |
| 352 | Right_Shoulder.Part0 = Torso | |
| 353 | Right_Shoulder.Part1 = Right_Arm | |
| 354 | Right_Shoulder.Name = "Right Shoulder" | |
| 355 | Right_Shoulder.C0 = CFrame.new(1.5,0,0) | |
| 356 | ||
| 357 | LeftShoulder.Parent = nil | |
| 358 | RightShoulder.Parent = nil | |
| 359 | Humanoid.WalkSpeed = 10 | |
| 360 | ||
| 361 | local RootCFrame = CFrame.fromEulerAnglesXYZ(-1.57,0,3.14) | |
| 362 | Necko = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
| 363 | Necko2 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
| 364 | Right_Hip_C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
| 365 | Left_Hip_C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
| 366 | ||
| 367 | ||
| 368 | Movemment = 1 | |
| 369 | Walk = 0 | |
| 370 | ||
| 371 | Animator = Humanoid.Animator | |
| 372 | --Animate = Character.Animate | |
| 373 | ||
| 374 | Animator.Parent = nil | |
| 375 | --Animate.Parent = nil | |
| 376 | ||
| 377 | local Services = {
| |
| 378 | ||
| 379 | SoundService = game:GetService("SoundService");
| |
| 380 | Players = game:GetService("Players");
| |
| 381 | Debris = game:GetService("Debris");
| |
| 382 | Workspace = game:GetService("Workspace");
| |
| 383 | Lighting = game:GetService("Lighting");
| |
| 384 | HttpService = game:GetService("HttpService");
| |
| 385 | InsertService = game:GetService("InsertService");
| |
| 386 | ||
| 387 | } | |
| 388 | local ManaBarGUI = Instance.new("ScreenGui", Player.PlayerGui)
| |
| 389 | ManaBarGUI.Name = "ManaBarGUI" | |
| 390 | ||
| 391 | local ManaBarP1 = Instance.new("Frame", ManaBarGUI)
| |
| 392 | ManaBarP1.Name = "ManaBarPart1" | |
| 393 | ManaBarP1.Size = UDim2.new(0,300,0,20) | |
| 394 | ManaBarP1.Position = UDim2.new(0,350,0.1,0) | |
| 395 | ManaBarP1.BackgroundColor3 = BrickColor.Yellow().Color | |
| 396 | ||
| 397 | local ManaBarP2 = Instance.new("Frame", ManaBarP1)
| |
| 398 | ManaBarP2.Name = "ManaBarPart2" | |
| 399 | ManaBarP2.Size = UDim2.new(0,300,0,20) | |
| 400 | ManaBarP2.Position = UDim2.new(0,0,0,0) | |
| 401 | ManaBarP2.BackgroundColor3 = BrickColor.new("White").Color
| |
| 402 | ||
| 403 | local ManaBarText = Instance.new("TextLabel", ManaBarP1)
| |
| 404 | ManaBarText.Name = "ManaBarText" | |
| 405 | ManaBarText.Size = UDim2.new(0,300,0,20) | |
| 406 | ManaBarText.Position = UDim2.new(0,0,-1.5,0) | |
| 407 | ManaBarText.TextScaled = true | |
| 408 | ManaBarText.Text = "<{[ Retribution ]}> 0 <{[ Retribution ]}>"
| |
| 409 | ManaBarText.BackgroundTransparency = 1 | |
| 410 | ManaBarText.TextStrokeTransparency = 0 | |
| 411 | ManaBarText.TextStrokeColor3 = Color3.new(255, 255, 255) | |
| 412 | ManaBarText.TextColor3 = Color3.new(255, 255, 0) | |
| 413 | ManaBarText.Font = "Garamond" | |
| 414 | local WorldEaterGui = Instance.new("BillboardGui", Head)
| |
| 415 | WorldEaterGui.ExtentsOffset = Vector3.new(0,5,0) | |
| 416 | WorldEaterGui.Adornee = Head | |
| 417 | WorldEaterGui.AlwaysOnTop = true | |
| 418 | WorldEaterGui.Enabled = true | |
| 419 | WorldEaterGui.Size = UDim2.new(0, 200,0, 50) | |
| 420 | ||
| 421 | local WorldEaterText = Instance.new("TextLabel", WorldEaterGui)
| |
| 422 | WorldEaterText.BackgroundTransparency = 1 | |
| 423 | WorldEaterText.Font = "Garamond" | |
| 424 | WorldEaterText.Size = UDim2.new(0, 200,0, 50) | |
| 425 | WorldEaterText.TextStrokeColor3 = BrickColor.Yellow().Color | |
| 426 | WorldEaterText.TextStrokeTransparency = 0 | |
| 427 | WorldEaterText.TextColor3 = BrickColor.White().Color | |
| 428 | WorldEaterText.TextScaled = true | |
| 429 | WorldEaterText.Text = "The Sa".."vior" | |
| 430 | ||
| 431 | --------[[ Mesh Ids ]]-------- | |
| 432 | ||
| 433 | SpikeMeshId = 1033714 | |
| 434 | SpikeBallId = 9982590 | |
| 435 | StarMeshId = 45428961 | |
| 436 | CrystalMeshId = 9756362 | |
| 437 | ||
| 438 | --[[ Essential Functions ]]-- | |
| 439 | function NoOutlines(Part) | |
| 440 | Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10 | |
| 441 | end | |
| 442 | ||
| 443 | ||
| 444 | local CreatePart = function(Parent, Name, Color, Size, Material, Transparency, Shape) | |
| 445 | ||
| 446 | local Part = Instance.new("Part", Parent)
| |
| 447 | Part.Name = Name | |
| 448 | Part.BrickColor = BrickColor.new(Color) | |
| 449 | Part.Size = Size | |
| 450 | Part.Material = Material | |
| 451 | Part.Transparency = Transparency | |
| 452 | Part.Shape = Shape | |
| 453 | Part.CanCollide = false | |
| 454 | NoOutlines(Part) | |
| 455 | ||
| 456 | return Part | |
| 457 | ||
| 458 | end | |
| 459 | ||
| 460 | local CreateMesh = function(Parent, Scale, Shape) | |
| 461 | ||
| 462 | ||
| 463 | local Mesh = Instance.new("BlockMesh", Parent)
| |
| 464 | Mesh.Scale = Scale | |
| 465 | ||
| 466 | return Mesh | |
| 467 | ||
| 468 | end | |
| 469 | ||
| 470 | local CreateWedge = function(Parent, Name, Color, Size, Material, Transparency) | |
| 471 | ||
| 472 | local WedgePart = Instance.new("WedgePart", Parent)
| |
| 473 | WedgePart.Name = Name | |
| 474 | WedgePart.BrickColor = BrickColor.new(Color) | |
| 475 | WedgePart.Size = Size | |
| 476 | WedgePart.Material = Material | |
| 477 | WedgePart.Transparency = Transparency | |
| 478 | WedgePart.CanCollide = false | |
| 479 | NoOutlines(WedgePart) | |
| 480 | ||
| 481 | return WedgePart | |
| 482 | ||
| 483 | end | |
| 484 | ||
| 485 | local CreateWeld = function(Parent, Cframe, P1 , P0) | |
| 486 | ||
| 487 | local Weld = Instance.new("Weld", Parent)
| |
| 488 | Weld.Part0 = P0 | |
| 489 | Weld.Part1 = P1 | |
| 490 | Weld.Name = P0.Name .. "To" .. P1.Name | |
| 491 | Weld.C0 = Cframe | |
| 492 | ||
| 493 | return Weld | |
| 494 | ||
| 495 | end | |
| 496 | ||
| 497 | local CreateVelocity = function(Parent,Velocity,Force) | |
| 498 | ||
| 499 | local BodyVelocity = Instance.new("BodyVelocity", Parent)
| |
| 500 | BodyVelocity.Velocity = Velocity | |
| 501 | BodyVelocity.MaxForce = Force | |
| 502 | ||
| 503 | ||
| 504 | ||
| 505 | return BodyVelocity | |
| 506 | ||
| 507 | end | |
| 508 | ||
| 509 | ||
| 510 | local CreateCrystal = function(Parent, Name, Color, Size, Material, Transparency, Scale) | |
| 511 | ||
| 512 | ||
| 513 | local Part = Instance.new("Part", Parent)
| |
| 514 | Part.Name = Name | |
| 515 | Part.BrickColor = BrickColor.new(Color) | |
| 516 | Part.Size = Size | |
| 517 | Part.Material = Material | |
| 518 | Part.Transparency = Transparency | |
| 519 | Part.CanCollide = false | |
| 520 | NoOutlines(Part) | |
| 521 | ||
| 522 | local Mesh = Instance.new("SpecialMesh", Part)
| |
| 523 | Mesh.MeshId = "http://www.roblox.com/asset?id=" .. CrystalMeshId | |
| 524 | Mesh.Scale = Scale | |
| 525 | ||
| 526 | return Mesh and Part | |
| 527 | ||
| 528 | end | |
| 529 | ||
| 530 | local MakeSFX = function(Parent, Id, Volume, Pitch, Type) | |
| 531 | ||
| 532 | local SFX = Instance.new("Sound", Parent)
| |
| 533 | SFX.SoundId = "http://www.roblox.com/asset?id=" .. Id | |
| 534 | SFX.Name = "SFX" | |
| 535 | SFX:Play() | |
| 536 | SFX.Volume = Volume | |
| 537 | SFX.Pitch = Pitch | |
| 538 | SFX.PlayOnRemove = true | |
| 539 | SFX:Remove() | |
| 540 | ||
| 541 | if Type == "Echo" then | |
| 542 | ||
| 543 | Instance.new("EchoSoundEffect", SFX)
| |
| 544 | ||
| 545 | end | |
| 546 | ||
| 547 | end | |
| 548 | ||
| 549 | local CreateSpike = function(Parent, Name, Color, Size, Material, Transparency, Scale) | |
| 550 | ||
| 551 | ||
| 552 | local Part = Instance.new("Part", Parent)
| |
| 553 | Part.Name = Name | |
| 554 | Part.BrickColor = BrickColor.new(Color) | |
| 555 | Part.Size = Size | |
| 556 | Part.Material = Material | |
| 557 | Part.Transparency = Transparency | |
| 558 | Part.CanCollide = false | |
| 559 | NoOutlines(Part) | |
| 560 | ||
| 561 | local Mesh = Instance.new("SpecialMesh", Part)
| |
| 562 | Mesh.MeshId = "http://www.roblox.com/asset?id=" .. SpikeMeshId | |
| 563 | Mesh.Scale = Scale | |
| 564 | ||
| 565 | return Mesh and Part | |
| 566 | ||
| 567 | end | |
| 568 | ||
| 569 | CircleEffect = function(Position, Parent, DSX, DSY, DSZ, SX, SY, SZ, Time, Brickcolor, Material, Transparency) | |
| 570 | ||
| 571 | local Part = Instance.new("Part", Parent)
| |
| 572 | Part.Transparency = Transparency | |
| 573 | Part.Name = "CircleEffect" | |
| 574 | Part.Size = Vector3.new() | |
| 575 | Part.Anchored = true | |
| 576 | Part.CanCollide = false | |
| 577 | Part.Position = Position | |
| 578 | Part.BrickColor = BrickColor.new(Brickcolor) | |
| 579 | Part.Material = Material | |
| 580 | NoOutlines(Part) | |
| 581 | ||
| 582 | local Mesh = Instance.new("SpecialMesh", Part)
| |
| 583 | Mesh.MeshType = "Sphere" | |
| 584 | Mesh.Scale = Vector3.new(DSX, DSY, DSZ) | |
| 585 | ||
| 586 | Services.Debris:AddItem(Part, Time) | |
| 587 | ||
| 588 | ||
| 589 | table.insert(Effects, {Part, "Circle", Time, SX, SY, SZ})
| |
| 590 | ||
| 591 | ||
| 592 | end | |
| 593 | ||
| 594 | BlockEffect = function(Position, Parent, DSX, DSY, DSZ, SX, SY, SZ, Time, Brickcolor, Material, Transparency) | |
| 595 | ||
| 596 | local Part = Instance.new("Part", Parent)
| |
| 597 | Part.Transparency = Transparency | |
| 598 | Part.Name = "BlockEffect" | |
| 599 | Part.Size = Vector3.new() | |
| 600 | Part.Anchored = true | |
| 601 | Part.Position = Position | |
| 602 | Part.CanCollide = false | |
| 603 | Part.BrickColor = BrickColor.new(Brickcolor) | |
| 604 | Part.Material = Material | |
| 605 | NoOutlines(Part) | |
| 606 | ||
| 607 | local Mesh = Instance.new("BlockMesh", Part)
| |
| 608 | Mesh.Scale = Vector3.new(DSX, DSY, DSZ) | |
| 609 | ||
| 610 | Services.Debris:AddItem(Part, Time) | |
| 611 | ||
| 612 | table.insert(Effects, {Part, "Block", Time, SX, SY, SZ})
| |
| 613 | ||
| 614 | ||
| 615 | end | |
| 616 | ||
| 617 | --[[ Damage function ]]-- | |
| 618 | ||
| 619 | ||
| 620 | function DamageFunction(Hit, Part, Type, HitSFX, Knockback, Min, Max) | |
| 621 | ||
| 622 | local HitHumanoid = Hit.Parent.Humanoid | |
| 623 | ||
| 624 | ||
| 625 | local Damage = math.random(Min, Max) | |
| 626 | ||
| 627 | ||
| 628 | coroutine.resume(coroutine.create(function() | |
| 629 | HitHumanoid:TakeDamage(Damage) | |
| 630 | end)) | |
| 631 | ||
| 632 | if Type == "Shrink" then | |
| 633 | MakeSFX(Hit.Parent.Torso, 209527235, 1, 1) | |
| 634 | for i,v in pairs(Hit.Parent:children()) do | |
| 635 | if v:IsA("Part") then
| |
| 636 | coroutine.resume(coroutine.create(function() | |
| 637 | for i = 1,100 do | |
| 638 | wait() | |
| 639 | v.Size = v.Size - Vector3.new(0.05,0.05,0.05) | |
| 640 | v.Transparency = v.Transparency + 0.05 | |
| 641 | ||
| 642 | end | |
| 643 | end)) | |
| 644 | end | |
| 645 | end | |
| 646 | ||
| 647 | end | |
| 648 | ||
| 649 | ||
| 650 | ||
| 651 | ||
| 652 | ||
| 653 | ||
| 654 | if Type == "Normal" then | |
| 655 | ||
| 656 | local Push = CreateVelocity(Hit.Parent.Torso, Torso.CFrame.lookVector * Knockback, Vector3.new(math.huge,math.huge,math.huge)) | |
| 657 | Services.Debris:AddItem(Push, 0) | |
| 658 | DamageLabel(Hit.Parent, Damage, Hit) | |
| 659 | ||
| 660 | elseif Type == "Ranged" then | |
| 661 | local Push = CreateVelocity(Hit.Parent.Torso, Part.CFrame.lookVector * Knockback, Vector3.new(math.huge,math.huge,math.huge)) | |
| 662 | Services.Debris:AddItem(Push, 0) | |
| 663 | DamageLabel(Hit.Parent, Damage, Hit) | |
| 664 | ||
| 665 | elseif Type == "Impale" then | |
| 666 | ||
| 667 | local Spike = CreateSpike(Services.Workspace, "D e a t h", "Institutional white", Vector3.new(), "SmoothPlastic", 0, Vector3.new(1,20,1)) | |
| 668 | Spike.Anchored = true | |
| 669 | Spike.Rotation = Vector3.new(math.random(-50,50), 0 , math.random(-50,50)) | |
| 670 | Spike.Position = Hit.Parent.Torso.Position | |
| 671 | ||
| 672 | ||
| 673 | Services.Debris:AddItem(Spike, 30) | |
| 674 | ||
| 675 | Hit.Parent:BreakJoints() | |
| 676 | Hit.Parent.Torso.Position = Spike.Position + Vector3.new(0,5,0) | |
| 677 | Hit.Parent.Torso.Anchored = true | |
| 678 | ||
| 679 | MakeSFX(Spike, 306247724, 1,1) | |
| 680 | MakeSFX(Hit.Parent.Torso, 209527175, 10,1) | |
| 681 | elseif Type == "Knockdown" then | |
| 682 | ||
| 683 | ||
| 684 | local Push = CreateVelocity(Hit.Parent.Torso, Part.CFrame.lookVector * Knockback, Vector3.new(math.huge,math.huge,math.huge)) | |
| 685 | DamageLabel(Hit.Parent, Damage, Hit) | |
| 686 | Services.Debris:AddItem(Push, 0.3) | |
| 687 | ||
| 688 | coroutine.resume(coroutine.create(function() | |
| 689 | ||
| 690 | HitHumanoid.PlatformStand = true | |
| 691 | wait(1) | |
| 692 | HitHumanoid.PlatformStand = false | |
| 693 | ||
| 694 | ||
| 695 | end)) | |
| 696 | end | |
| 697 | ||
| 698 | if HitSFX == "Penetration" then | |
| 699 | ||
| 700 | MakeSFX(Hit, 199149269, 1 , 1) | |
| 701 | ||
| 702 | elseif HitSFX == "Punch" then | |
| 703 | ||
| 704 | MakeSFX(Hit, 278062209, 1 , 1) | |
| 705 | ||
| 706 | ||
| 707 | ||
| 708 | ||
| 709 | end | |
| 710 | end | |
| 711 | ||
| 712 | function DamageLabel(HitCharacter, DamageDealt, Hit) | |
| 713 | ||
| 714 | local DamageShowingPart = CreatePart(Services.Workspace, "ShowDamage", "Bright yellow", Vector3.new(0.8,0.8,0.8), "Neon", 1, "Block") | |
| 715 | DamageShowingPart.Position = HitCharacter.Head.Position | |
| 716 | ||
| 717 | local DamageGui = Instance.new("BillboardGui", DamageShowingPart)
| |
| 718 | DamageGui.Name = "Damage" | |
| 719 | DamageGui.AlwaysOnTop = true | |
| 720 | DamageGui.Size = UDim2.new(5, 0, 5, 0) | |
| 721 | ||
| 722 | local DamageNumber = Instance.new("TextLabel", DamageGui)
| |
| 723 | DamageNumber.Size = UDim2.new(1,0,1,0) | |
| 724 | if Hit.Parent:FindFirstChild("Head") then
| |
| 725 | DamageNumber.TextStrokeColor3 = Hit.Parent.Head.BrickColor.Color | |
| 726 | DamageNumber.TextColor3 = Hit.BrickColor.Color | |
| 727 | end | |
| 728 | DamageNumber.TextStrokeTransparency = 0 | |
| 729 | DamageNumber.BackgroundTransparency = 1 | |
| 730 | DamageNumber.Font = "SourceSansBold" | |
| 731 | DamageNumber.TextScaled = true | |
| 732 | DamageNumber.Text = DamageDealt | |
| 733 | ||
| 734 | local BodyVelocity = Instance.new("BodyVelocity", DamageShowingPart)
| |
| 735 | BodyVelocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge) | |
| 736 | BodyVelocity.Velocity = Vector3.new(0,2,0) | |
| 737 | ||
| 738 | Services.Debris:AddItem(DamageShowingPart, 3) | |
| 739 | ||
| 740 | ||
| 741 | end | |
| 742 | ||
| 743 | function ValidateDamage(Part, Distance ,Min , Max, Type, HitSFX, Knockback) | |
| 744 | for _,WorkspaceChildren in pairs(workspace:children()) do | |
| 745 | ||
| 746 | local HitHumanoid = WorkspaceChildren:findFirstChild("Humanoid")
| |
| 747 | ||
| 748 | if HitHumanoid ~= nil then | |
| 749 | local Hit = WorkspaceChildren:findFirstChild("Torso")
| |
| 750 | ||
| 751 | if Hit ~= nil then | |
| 752 | ||
| 753 | local Target = Hit.Position - Part.Position | |
| 754 | ||
| 755 | local Magnitude = Target.magnitude | |
| 756 | ||
| 757 | if Magnitude <= Distance and WorkspaceChildren.Name ~= Player.Name then | |
| 758 | ||
| 759 | local HitBlock = Hit.Parent:FindFirstChild("Block")
| |
| 760 | ||
| 761 | if HitBlock ~= nil and HitBlock:FindFirstChild("BlockDurability") and HitBlock.Value == true then
| |
| 762 | ||
| 763 | local HitBlock2 = Hit.Parent.Block.BlockDurability | |
| 764 | ||
| 765 | if HitBlock2.Value > 15 then | |
| 766 | ||
| 767 | local HitN = math.random(1,5) | |
| 768 | ||
| 769 | HitBlock2.Value = HitBlock2.Value - 15 | |
| 770 | ||
| 771 | ||
| 772 | if HitN == 1 then | |
| 773 | MakeSFX(Hit ,199148971, 0.5, 1) | |
| 774 | end | |
| 775 | ||
| 776 | if HitN == 2 then | |
| 777 | MakeSFX(Hit ,199149025, 0.5, 1) | |
| 778 | end | |
| 779 | ||
| 780 | if HitN == 3 then | |
| 781 | MakeSFX(Hit ,199149072, 0.5, 1) | |
| 782 | end | |
| 783 | ||
| 784 | if HitN == 4 then | |
| 785 | MakeSFX(Hit ,199149109, 0.5, 1) | |
| 786 | end | |
| 787 | ||
| 788 | if HitN == 5 then | |
| 789 | MakeSFX(Hit ,199149119, 0.5, 1) | |
| 790 | end | |
| 791 | return | |
| 792 | end | |
| 793 | end | |
| 794 | ||
| 795 | DamageFunction(Hit, Part, Type, HitSFX, Knockback, Min, Max) | |
| 796 | ||
| 797 | ||
| 798 | ||
| 799 | end | |
| 800 | end | |
| 801 | end | |
| 802 | end | |
| 803 | end | |
| 804 | ||
| 805 | ||
| 806 | ||
| 807 | local Cloak = Instance.new("Part", Character)
| |
| 808 | Cloak.Name = "Cloak" | |
| 809 | Cloak.CanCollide = false | |
| 810 | Cloak.BrickColor = BrickColor.new("Institutional white")
| |
| 811 | ||
| 812 | ||
| 813 | ||
| 814 | ||
| 815 | local CloakMesh = Instance.new("SpecialMesh", Cloak)
| |
| 816 | CloakMesh.MeshId = "http://www.roblox.com/asset?id=87249889" | |
| 817 | CloakMesh.TextureId = "http://www.roblox.com/asset?id=134518907" | |
| 818 | ||
| 819 | local CloakWeld = CreateWeld(Cloak, CFrame.new(0,0,0) * CFrame.Angles(0,0,0), Head , Cloak, "ArkusToCharacter") | |
| 820 | ||
| 821 | for i,v in pairs(Character:children()) do | |
| 822 | if v:IsA("Accessory") then
| |
| 823 | v:Remove() | |
| 824 | elseif v:IsA("Shirt") then
| |
| 825 | v:Remove() | |
| 826 | elseif v:IsA("Pants") then
| |
| 827 | v:Remove() | |
| 828 | elseif v:IsA("BodyColors") then
| |
| 829 | ||
| 830 | Head.BrickColor =BrickColor.new("Institutional white")
| |
| 831 | Torso.BrickColor = BrickColor.new("Institutional white")
| |
| 832 | Right_Arm.BrickColor = BrickColor.new("Institutional white")
| |
| 833 | Right_Leg.BrickColor = BrickColor.new("Institutional white")
| |
| 834 | Left_Arm.BrickColor = BrickColor.new("Institutional white")
| |
| 835 | Left_Leg.BrickColor = BrickColor.new("Institutional white")
| |
| 836 | ||
| 837 | v.HeadColor = BrickColor.new("Institutional white")
| |
| 838 | v.TorsoColor = BrickColor.new("Institutional white")
| |
| 839 | v.RightArmColor = BrickColor.new("Institutional white")
| |
| 840 | v.LeftArmColor = BrickColor.new("Institutional white")
| |
| 841 | v.RightLegColor = BrickColor.new("Institutional white")
| |
| 842 | v.LeftLegColor = BrickColor.new("Institutional white")
| |
| 843 | ||
| 844 | end | |
| 845 | end | |
| 846 | ||
| 847 | ||
| 848 | ||
| 849 | --[[ CLerp Declarations ]]-- | |
| 850 | ||
| 851 | function clerp(a,b,t) | |
| 852 | local qa = {QuaternionFromCFrame(a)}
| |
| 853 | local qb = {QuaternionFromCFrame(b)}
| |
| 854 | local ax, ay, az = a.x, a.y, a.z | |
| 855 | local bx, by, bz = b.x, b.y, b.z | |
| 856 | local _t = 1-t | |
| 857 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
| 858 | end | |
| 859 | ||
| 860 | function QuaternionFromCFrame(cf) -- dis one | |
| 861 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
| 862 | local trace = m00 + m11 + m22 | |
| 863 | if trace > 0 then | |
| 864 | local s = math.sqrt(1 + trace) | |
| 865 | local recip = 0.5/s | |
| 866 | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 | |
| 867 | else | |
| 868 | local i = 0 | |
| 869 | if m11 > m00 then | |
| 870 | i = 1 | |
| 871 | end | |
| 872 | if m22 > (i == 0 and m00 or m11) then | |
| 873 | i = 2 | |
| 874 | end | |
| 875 | if i == 0 then | |
| 876 | local s = math.sqrt(m00-m11-m22+1) | |
| 877 | local recip = 0.5/s | |
| 878 | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip | |
| 879 | elseif i == 1 then | |
| 880 | local s = math.sqrt(m11-m22-m00+1) | |
| 881 | local recip = 0.5/s | |
| 882 | return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip | |
| 883 | elseif i == 2 then | |
| 884 | local s = math.sqrt(m22-m00-m11+1) | |
| 885 | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip | |
| 886 | end | |
| 887 | end | |
| 888 | end | |
| 889 | ||
| 890 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
| 891 | local xs, ys, zs = x + x, y + y, z + z | |
| 892 | local wx, wy, wz = w*xs, w*ys, w*zs | |
| 893 | local xx = x*xs | |
| 894 | local xy = x*ys | |
| 895 | local xz = x*zs | |
| 896 | local yy = y*ys | |
| 897 | local yz = y*zs | |
| 898 | local zz = z*zs | |
| 899 | return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy)) | |
| 900 | end | |
| 901 | ||
| 902 | function QuaternionSlerp(a, b, t) | |
| 903 | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] | |
| 904 | local startInterp, finishInterp; | |
| 905 | if cosTheta >= 0.0001 then | |
| 906 | if (1 - cosTheta) > 0.0001 then | |
| 907 | local theta = math.acos(cosTheta) | |
| 908 | local invSinTheta = 1/math.sin(theta) | |
| 909 | startInterp = math.sin((1-t)*theta)*invSinTheta | |
| 910 | finishInterp = math.sin(t*theta)*invSinTheta | |
| 911 | else | |
| 912 | startInterp = 1-t | |
| 913 | finishInterp = t | |
| 914 | end | |
| 915 | else | |
| 916 | if (1+cosTheta) > 0.0001 then | |
| 917 | local theta = math.acos(-cosTheta) | |
| 918 | local invSinTheta = 1/math.sin(theta) | |
| 919 | startInterp = math.sin((t-1)*theta)*invSinTheta | |
| 920 | finishInterp = math.sin(t*theta)*invSinTheta | |
| 921 | else | |
| 922 | startInterp = t-1 | |
| 923 | finishInterp = t | |
| 924 | end | |
| 925 | end | |
| 926 | return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp | |
| 927 | end | |
| 928 | ||
| 929 | function RayCast(Pos, Dir, Max, Ignore) | |
| 930 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
| |
| 931 | end | |
| 932 | ||
| 933 | ||
| 934 | function Bars() | |
| 935 | ||
| 936 | --[[ Mana Bar ]]-- | |
| 937 | if Destruction ~= MaxDestruction then | |
| 938 | ||
| 939 | Destruction = Destruction + 1 | |
| 940 | ||
| 941 | end | |
| 942 | ||
| 943 | if Destruction >= MaxDestruction then | |
| 944 | ||
| 945 | Destruction = Destruction | |
| 946 | ||
| 947 | end | |
| 948 | ||
| 949 | ||
| 950 | ManaBarText.Text = "<{[ Retribution ]}> <|"..Destruction.."|> <{[ Retribution ]}>"
| |
| 951 | ||
| 952 | ManaBarP2.Size = UDim2.new(Destruction / Destruction,0,0,20) | |
| 953 | ||
| 954 | end | |
| 955 | local EyeReference = CreatePart(Character, "Reference", "Dark stone grey", Vector3.new(), "SmoothPlastic", 1, "Block") | |
| 956 | local EyeReferenceWeld = CreateWeld(EyeReference, CFrame.new(0.15,-0.1,-0.7), EyeReference, Head) | |
| 957 | ||
| 958 | coroutine.resume(coroutine.create(function() | |
| 959 | ||
| 960 | while wait(3) do | |
| 961 | ||
| 962 | ||
| 963 | CircleEffect(EyeReference.Position, Services.Workspace, 1, 1, 1, 1, 1, 1, 0.5, "Bright red", "Neon", 0.5) | |
| 964 | ||
| 965 | ||
| 966 | end | |
| 967 | ||
| 968 | end)) | |
| 969 | --[[ Attacks ]]-- | |
| 970 | ||
| 971 | function Attack1() | |
| 972 | Attacking = true | |
| 973 | MakeSFX(EyeReference, 341336274, 1,1) | |
| 974 | wait(0.3) | |
| 975 | local Reference = CreatePart(Services.Workspace, "Reference", "Dark stone grey", Vector3.new(), "SmoothPlastic", 1, "Block") | |
| 976 | local ReferenceWeld = CreateWeld(Reference, CFrame.new(0,0.5,-5), Reference, Root) | |
| 977 | ||
| 978 | local Reference2 = CreatePart(Services.Workspace, "Reference", "Dark stone grey", Vector3.new(), "SmoothPlastic", 1, "Block") | |
| 979 | local Reference2Weld = CreateWeld(Reference2, CFrame.new(0,0.5,-2), Reference2, Root) | |
| 980 | ||
| 981 | ||
| 982 | for i = 1,10 do | |
| 983 | ||
| 984 | wait() | |
| 985 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,-1.6),0.5) | |
| 986 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0,0,1.3),0.2) | |
| 987 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0.1, 0) * CFrame.Angles(0,0,0.2), 0.3) | |
| 988 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(0,0,-1.6), 0.4) | |
| 989 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0) * CFrame.Angles(0,1.6,0),0.3) | |
| 990 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0) * CFrame.Angles(0,-1.6,0),0.3) | |
| 991 | ||
| 992 | end | |
| 993 | ||
| 994 | CircleEffect(Reference2.Position, Services.Workspace, 50, 50, 50, -5, -5, -5, 5, "Lime green", "Neon", 0.5) | |
| 995 | wait(0.5) | |
| 996 | CircleEffect(Reference2.Position, Services.Workspace, 50, 50, 50, -5, -5, -5, 5, "Lime green", "Neon", 0.5) | |
| 997 | wait(0.5) | |
| 998 | CircleEffect(Reference2.Position, Services.Workspace, 50, 50, 50, -5, -5, -5, 5, "Lime green", "Neon", 0.5) | |
| 999 | wait(0.5) | |
| 1000 | CircleEffect(Reference2.Position, Services.Workspace, 50, 50, 50, -5, -5, -5, 5, "Lime green", "Neon", 0.5) | |
| 1001 | wait(0.5) | |
| 1002 | MakeSFX(Reference, 306247724, 1,1) | |
| 1003 | CircleEffect(Reference.Position, Services.Workspace, 1, 1, 1, 5, 5, 5, 5, "Lime green", "Neon", 0.5) | |
| 1004 | ValidateDamage(Reference, 10 ,10 , 14, "Shrink", "Penetration", 5) | |
| 1005 | Attacking = false | |
| 1006 | end | |
| 1007 | ||
| 1008 | function Attack2() | |
| 1009 | ||
| 1010 | Attacking = true | |
| 1011 | Humanoid.WalkSpeed = 0 | |
| 1012 | Humanoid.JumpPower = 0 | |
| 1013 | ||
| 1014 | ||
| 1015 | for i = 1,25 do | |
| 1016 | wait() | |
| 1017 | ||
| 1018 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(-0.5,0,0),0.2) | |
| 1019 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(-0.5,0,0),0.3) | |
| 1020 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1, 1, 0) * CFrame.Angles(3.2,0,-0.6), 0.3) | |
| 1021 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1, 1, 0) * CFrame.Angles(3.2,0,0.6), 0.3) | |
| 1022 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,1.6,-0.3),0.2) | |
| 1023 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,-0.5)*CFrame.Angles(0,-1.6,0),0.2) | |
| 1024 | ||
| 1025 | end | |
| 1026 | ||
| 1027 | MakeSFX(Torso, 142070127, 1, 1) | |
| 1028 | ValidateDamage(Torso, 60 ,23, 26, "Knockdown", "Penetration", 15) | |
| 1029 | local Hit, Position = RayCast(Torso.Position,(CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector,100,Character) | |
| 1030 | if Hit ~= nil then | |
| 1031 | local Reference = CreatePart(Services.Workspace, "Reference", "Dark stone grey", Vector3.new(), "SmoothPlastic", 1, "Block") | |
| 1032 | Reference.Anchored = true | |
| 1033 | Reference.CFrame = CFrame.new(Position) | |
| 1034 | ||
| 1035 | CircleEffect(Reference.Position, Services.Workspace, 1, 1, 1, 5, 5, 5, 5, "Institutional white", "Neon", 0.5) | |
| 1036 | ||
| 1037 | game:GetService("Debris"):AddItem(Reference,0.1)
| |
| 1038 | for i=1,50 do | |
| 1039 | ||
| 1040 | local Ground = CreatePart(Services.Workspace, "Ground", Hit.BrickColor.Color, Vector3.new(math.random(1,3), math.random(1,3), math.random(1,3)), Hit.Material, 0, "Block") | |
| 1041 | Ground.Anchored = true | |
| 1042 | Ground.CanCollide = true | |
| 1043 | Ground.CFrame = CFrame.new(Position) * CFrame.new(math.random(-30,30), 0, math.random(-30,30)) * CFrame.Angles(math.random(-50,50),math.random(-50,50), math.random(-50,50)) | |
| 1044 | ||
| 1045 | game:GetService("Debris"):AddItem(Ground,10)
| |
| 1046 | ||
| 1047 | end | |
| 1048 | end | |
| 1049 | ||
| 1050 | for i = 1,25 do | |
| 1051 | wait() | |
| 1052 | ||
| 1053 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0),0.5) | |
| 1054 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0.5,0,0),0.3) | |
| 1055 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0, 0.1) * CFrame.Angles(-0.2,0,0), 0.3) | |
| 1056 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0, 0.1) * CFrame.Angles(-0.2,0,0), 0.3) | |
| 1057 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,1.6,-0.3),0.2) | |
| 1058 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,-0.5)*CFrame.Angles(0,-1.6,0),0.2) | |
| 1059 | ||
| 1060 | end | |
| 1061 | ||
| 1062 | Attacking = false | |
| 1063 | Humanoid.WalkSpeed = 16 | |
| 1064 | Humanoid.JumpPower = 50 | |
| 1065 | ||
| 1066 | ||
| 1067 | ||
| 1068 | end | |
| 1069 | ||
| 1070 | ||
| 1071 | function Attack3() | |
| 1072 | Humanoid.WalkSpeed = 0 | |
| 1073 | Humanoid.JumpPower = 0 | |
| 1074 | Attacking = true | |
| 1075 | wait(1) | |
| 1076 | MakeSFX(Torso, 341336274, 1, 1.2) | |
| 1077 | CircleEffect(Torso.Position, Services.Workspace, 1, 1, 1, 20, 20, 20, 5, "Institutional white", "Neon", 0.5) | |
| 1078 | wait(1) | |
| 1079 | MakeSFX(Torso, 341336274, 1, 1.2) | |
| 1080 | CircleEffect(Torso.Position, Services.Workspace, 1, 1, 1, 20, 20, 20, 5, "Institutional white", "Neon", 0.5) | |
| 1081 | wait(1) | |
| 1082 | MakeSFX(Torso, 341336274, 1, 1.2) | |
| 1083 | CircleEffect(Torso.Position, Services.Workspace, 1, 1, 1, 20, 20, 20, 5, "Institutional white", "Neon", 0.5) | |
| 1084 | ValidateDamage(Torso, 60 ,0, 0, "Impale", "Penetration", 15) | |
| 1085 | Humanoid.WalkSpeed = 16 | |
| 1086 | Humanoid.JumpPower = 50 | |
| 1087 | Attacking = false | |
| 1088 | end | |
| 1089 | ||
| 1090 | mouse.KeyDown:connect(function(key) | |
| 1091 | if key == "z" then | |
| 1092 | Attack1() | |
| 1093 | ||
| 1094 | end | |
| 1095 | end) | |
| 1096 | ||
| 1097 | mouse.KeyDown:connect(function(key) | |
| 1098 | if key == "x" then | |
| 1099 | Attack2() | |
| 1100 | ||
| 1101 | end | |
| 1102 | end) | |
| 1103 | ||
| 1104 | mouse.KeyDown:connect(function(key) | |
| 1105 | if key == "c" then | |
| 1106 | Attack3() | |
| 1107 | ||
| 1108 | end | |
| 1109 | end) | |
| 1110 | ||
| 1111 | ||
| 1112 | --[[ CLerp Animations ]]-- | |
| 1113 | Change1 = 0 | |
| 1114 | Change2 = 0 | |
| 1115 | Change3 = 0 | |
| 1116 | Change4 = 0 | |
| 1117 | ||
| 1118 | while true do | |
| 1119 | wait() | |
| 1120 | ||
| 1121 | local Torvel = (Root.Velocity*Vector3.new(1,0,1)).magnitude | |
| 1122 | local Velderp = Root.Velocity.y | |
| 1123 | HitFloor,PosFloor = RayCast(Root.Position,(CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector,4,Character) | |
| 1124 | ||
| 1125 | Bars() | |
| 1126 | ||
| 1127 | ||
| 1128 | if Torvel < 1 and HitFloor ~= nil and Attacking == false then | |
| 1129 | Anim = "Idle" | |
| 1130 | ||
| 1131 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0),0.2) | |
| 1132 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0,-0.3,0),0.3) | |
| 1133 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0.1, 0) * CFrame.Angles(0,0,0.2), 0.3) | |
| 1134 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0.1, 0) * CFrame.Angles(0,0,-0.2), 0.3) | |
| 1135 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,1.6,0) * CFrame.Angles(-0.1,0,0),0.2) | |
| 1136 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-1.6,0) * CFrame.Angles(-0.1,0,0),0.2) | |
| 1137 | ||
| 1138 | end | |
| 1139 | ||
| 1140 | ||
| 1141 | if 2 < Torvel and Torvel < 22 and HitFloor ~= nil and Attacking == false then | |
| 1142 | Anim = "Walking" | |
| 1143 | ||
| 1144 | if Invert == false then | |
| 1145 | Change1 = Change1 + 0.1 | |
| 1146 | ||
| 1147 | elseif Invert == true then | |
| 1148 | ||
| 1149 | Change1 = Change1 - 0.1 | |
| 1150 | ||
| 1151 | end | |
| 1152 | ||
| 1153 | if Change1 > 0.5 then | |
| 1154 | ||
| 1155 | Invert = true | |
| 1156 | ||
| 1157 | elseif Change1 < -0.5 then | |
| 1158 | ||
| 1159 | Invert = false | |
| 1160 | ||
| 1161 | end | |
| 1162 | ||
| 1163 | if Attacking == false then | |
| 1164 | ||
| 1165 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0),0.2) | |
| 1166 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0,-0.3,0),0.3) | |
| 1167 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0, -Change1) * CFrame.Angles(Change1,0,0), 0.3) | |
| 1168 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0, Change1) * CFrame.Angles(-Change1,0,0), 0.3) | |
| 1169 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,-Change1 / 4)*CFrame.Angles(Change1,1.6,0),0.2) | |
| 1170 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,Change1 / 4)*CFrame.Angles(-Change1,-1.6,0),0.2) | |
| 1171 | ||
| 1172 | end | |
| 1173 | end | |
| 1174 | ||
| 1175 | if Root.Velocity.y > 1 and HitFloor == nil and Attacking == false then | |
| 1176 | Anim = "Jump" | |
| 1177 | ||
| 1178 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0),0.2) | |
| 1179 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(-0.5,0,0),0.3) | |
| 1180 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0, 0.2) * CFrame.Angles(-0.4,0,0.2), 0.3) | |
| 1181 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0, 0.2) * CFrame.Angles(-0.4,0,-0.2), 0.3) | |
| 1182 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,-0.2)*CFrame.Angles(-0.2,1.6,0),0.2) | |
| 1183 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-1.6,0),0.2) | |
| 1184 | ||
| 1185 | end | |
| 1186 | ||
| 1187 | if Root.Velocity.y < -1 and HitFloor == nil and Attacking == false then | |
| 1188 | Anim = "Fall" | |
| 1189 | ||
| 1190 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0),0.2) | |
| 1191 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0.5,0,0),0.3) | |
| 1192 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0, -0.2) * CFrame.Angles(0.4,0,0.2), 0.3) | |
| 1193 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0, -0.2) * CFrame.Angles(0.4,0,-0.2), 0.3) | |
| 1194 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,-0.2)*CFrame.Angles(-0.2,1.6,0),0.2) | |
| 1195 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-1.6,0),0.2) | |
| 1196 | ||
| 1197 | end | |
| 1198 | ||
| 1199 | ||
| 1200 | if #Effects > 0 then | |
| 1201 | for E = 1, #Effects do | |
| 1202 | if Effects[E]~=nil then | |
| 1203 | local Effect = Effects[E] | |
| 1204 | ||
| 1205 | if Effect ~= nil then | |
| 1206 | ||
| 1207 | local Part = Effect[1] | |
| 1208 | local Mode = Effect[2] | |
| 1209 | local Time = Effect[3] | |
| 1210 | local SizeX = Effect[4] | |
| 1211 | local SizeY = Effect[5] | |
| 1212 | local SizeZ = Effect[6] | |
| 1213 | ||
| 1214 | if Effect[1].Transparency <= 1 then | |
| 1215 | if Effect[2] == "Block" then | |
| 1216 | Effect[1].CFrame = Effect[1].CFrame * CFrame.Angles(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
| 1217 | ||
| 1218 | Mesh = Effect[1]:FindFirstChild("Mesh")
| |
| 1219 | if Mesh ~= nil then | |
| 1220 | Mesh.Scale = Mesh.Scale + Vector3.new(Effect[4],Effect[5],Effect[6]) | |
| 1221 | end | |
| 1222 | ||
| 1223 | elseif Effect[2] == "Circle" then | |
| 1224 | ||
| 1225 | if Effect[1]:FindFirstChild("Mesh") ~= nil then
| |
| 1226 | Mesh=Effect[1].Mesh | |
| 1227 | Mesh.Scale = Mesh.Scale + Vector3.new(Effect[4],Effect[5],Effect[6]) | |
| 1228 | end | |
| 1229 | ||
| 1230 | Effect[1].Transparency = Effect[1].Transparency + 0.05 | |
| 1231 | ||
| 1232 | else | |
| 1233 | ||
| 1234 | Part.Parent=nil | |
| 1235 | ||
| 1236 | table.remove(Effects, E) | |
| 1237 | ||
| 1238 | end | |
| 1239 | end | |
| 1240 | end | |
| 1241 | end | |
| 1242 | end | |
| 1243 | end | |
| 1244 | end |