Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- local RealPlayer = Player
- do print("FE Compatibility code by Mokiros");InternalData = {}InternalData.RealOwner = owner;InternalData.RealObjs = {};InternalData.SoundLoudness = {};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()}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;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 t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end,__call=function(self,...)local t=rawget(self,"_RealService")if t then return t(...)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 self[t]end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;x.RunService=v({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")setmetatable(x,{__index=function(self,t)return r:GetService(t)or typeof(r[t])=="function"and function(m,...)return r[t](r,...)end or r[t]end,__newindex=s.__newindex,__call=s.__call})game,owner=x,x.Players.LocalPlayer
- script.Parent = InternalData.RealOwner.Character
- local Event = Instance.new("RemoteEvent");Event.Name = "UserInput";InternalData.Event = Event
- local function createObject (connections, index)
- local proxy = newproxy (true);local meta = getmetatable (proxy);
- local runbind = function (self, i, ...) connections[i]:Fire (...); end;
- while (#connections > 0) do connections[table.remove(connections, 1)] = Instance.new ('BindableEvent');end;
- meta.__index = function (self, i)
- if (i == 'TriggerEvent') then return runbind end;
- return connections[i] and connections[i].Event or index[i];
- end;
- meta.__newindex = index;meta.__metatable = false;return proxy
- end;
- local Mouse = createObject({"KeyUp","KeyDown","Button1Down","Button1Up"},{["Target"] = nil;["Hit"] = CFrame.new()})
- local UserInputService = createObject({"InputBegan","InputEnded"},{})
- local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
- self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
- end};ContextActionService.UnBindAction = ContextActionService.BindAction
- Event.OnServerEvent:Connect(function(FiredBy,Input)
- if FiredBy ~= InternalData.RealOwner then return end
- if Input.MouseEvent then
- Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
- elseif Input.Sound then
- if InternalData.SoundLoudness[Input.Sound] then InternalData.SoundLoudness[Input.Sound] = Input.Loudness end
- else
- local Begin = Input.UserInputState == Enum.UserInputState.Begin
- if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TriggerEvent(Begin and "Button1Down" or "Button1Up") end
- for _,Action in pairs(ContextActionService.Actions) do
- for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
- end
- Mouse:TriggerEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower());UserInputService:TriggerEvent(Begin and "InputBegan" or "InputEnded",Input,false)
- end
- end)
- InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
- Event.Parent = NLS([[
- local Player = owner;
- local Sounds = {};
- local Event = script:WaitForChild("UserInput");
- local UserInputService = game:GetService("UserInputService");
- local Mouse = Player:GetMouse();
- local Input = function(Input,gameProcessedEvent)
- if gameProcessedEvent then return end
- Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
- end
- Event.OnClientEvent:connect(function(Args)
- if Args[1] == "NewSound" then table.insert(Sounds,Args[2]) end
- end)
- UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
- local Hit,Target
- while wait(1/30) do
- for x,Sound in pairs(Sounds) do
- if Sound.Parent then Event:FireServer({["Sound"]=Sound,["Loudness"]=Sound.PlaybackLoudness}) end
- end
- if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
- Hit = Mouse.Hit;Target = Mouse.Target;
- Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
- end
- end
- ]],InternalData.RealOwner.Character)
- end
- InternalData.NewOwner = setmetatable({},{
- __index = function (self,Index)
- local Type = type(InternalData.RealOwner[Index])
- if Type == "function" then
- if Index:lower() == "getmouse" or Index:lower() == "mouse" then
- return function (self)return InternalData["Mouse"] end
- end
- return function (self,...)return InternalData.RealOwner[Index](InternalData.RealOwner,...) end
- elseif Index == "FakePlayer" then
- return true
- end
- return InternalData.RealOwner[Index]
- end;
- __tostring = function(self) return tostring(InternalData.RealOwner) end
- })
- --LoadLibrary("RbxUtility").Create
- InternalData.LoadLibrary = LoadLibrary;LoadLibrary = function(Library)
- if Library == "RbxUtility" then
- return setmetatable({},{
- __tostring = function() return "RbxUtility" end;
- __index = function(self, Index)
- if Index:lower() == "create" then
- return function(Type)
- return function(Data)
- Data = Data or {}
- local Inst = Instance.new(Type)
- for x,y in pairs(Data) do
- if InternalData.RealObjs[y] then y = InternalData.RealObjs[y] end
- if y == owner then y = InternalData.RealOwner end
- Inst[x] = y
- end
- return Inst
- end
- end
- end
- return InternalData.LoadLibrary(Library)[Index]
- end
- })
- end
- return InternalData.LoadLibrary(Library)
- end
- InternalData.RealInstance = Instance;Instance = setmetatable({},{
- __index = function (self,Index)
- if Index:lower() == 'new' then
- return function (Type, Parent)
- if Parent == owner then Parent = InternalData.RealOwner end
- if InternalData.RealObjs[Parent] then Parent = InternalData.RealObjs[Parent] end
- local Real = InternalData.RealInstance.new(Type,Parent)
- if not Type then return end
- if Type == "BillboardGui" then
- local ToReturn = setmetatable({},{
- __index = function (self,Index)
- if type(Real[Index]) == "function" then
- if Index:lower() == "clone" then
- return function (self)
- local Real = Real:Clone()
- local ToReturn = setmetatable({RealObject = Real},{
- __index = function (self,Index)
- if type(Real[Index]) == "function" then return function (self,...) return Real[Index](Real,...)end end
- return Real[Index]
- end;
- __newindex = function (self,Index,Value)
- if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end
- if Value == owner then Value = InternalData.RealOwner end
- Real[Index] = Value
- end;
- __tostring = function(self) return tostring(Real) end;
- })
- InternalData.RealObjs[ToReturn] = Real;return ToReturn;
- end
- end
- return function (self,...) return Real[Index](Real,...)end
- end
- return Real[Index]
- end;
- __newindex = function (self,Index,Value)
- if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end
- if Value == owner then Value = InternalData.RealOwner end
- Real[Index] = Value
- end;
- __tostring = function(self) return tostring(Real) end;
- })
- InternalData.RealObjs[ToReturn] = Real;return ToReturn;
- elseif Type:lower() == "sound" then
- Real.Parent = owner.Character;
- local ToReturn = setmetatable({RealObject = Real},{
- __index = function (self,Index)
- if Index:lower() == "playbackloudness" then
- return InternalData.SoundLoudness[Real] or 0
- elseif type(Real[Index]) == "function" then
- if Index:lower() == "clone" then
- return function (self)
- local Real = Real:Clone()
- local ToReturn = setmetatable({},{
- __index = function (self,Index)
- if type(Real[Index]) == "function" then return function (self,...) return Real[Index](Real,...)end end
- return Real[Index]
- end;
- __newindex = function (self,Index,Value)
- if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end
- if Value == owner then Value = InternalData.RealOwner end
- Real[Index] = Value
- end;
- __tostring = function(self) return tostring(Real) end;
- })
- InternalData.RealObjs[ToReturn] = Real;return ToReturn;
- end
- end
- return function (self,...) return Real[Index](Real,...)end
- end
- return Real[Index]
- end;
- __newindex = function (self,Index,Value)
- if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end
- if Value == owner then Value = InternalData.RealOwner end
- Real[Index] = Value
- end;
- __tostring = function(self) return tostring(Real) end;
- })
- InternalData.RealObjs[ToReturn] = Real;InternalData.SoundLoudness[Real] = 0;repeat wait() until InternalData.Event.Parent InternalData.Event:FireClient(InternalData.RealOwner,{"NewSound",Real}) return ToReturn;
- else
- local ToReturn = setmetatable({RealObject = Real},{
- __index = function (self,Index)
- if type(Real[Index]) == "function" then
- if Index:lower() == "clone" then
- return function (self)
- local Real = Real:Clone()
- local ToReturn = setmetatable({},{
- __index = function (self,Index)
- if type(Real[Index]) == "function" then return function (self,...) return Real[Index](Real,...)end end
- return Real[Index]
- end;
- __newindex = function (self,Index,Value)
- if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end
- if Value == owner then Value = InternalData.RealOwner end
- Real[Index] = Value
- end;
- __tostring = function(self) return tostring(Real) end;
- })
- InternalData.RealObjs[ToReturn] = Real;return ToReturn;
- end
- end
- return function (self,...) return Real[Index](Real,...)end
- end
- return Real[Index]
- end;
- __newindex = function (self,Index,Value)
- if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end
- if Value == owner then Value = InternalData.RealOwner end
- Real[Index] = Value
- end;
- __tostring = function(self) return tostring(Real) end;
- })
- InternalData.RealObjs[ToReturn] = Real;return ToReturn;
- end
- end
- end
- return InternalData.RealInstance[Index]
- end;
- __tostring = function(self) return tostring(InternalData.RealInstance) end;
- });
- InternalData.RealGame = game;game = setmetatable({},{
- __index = function (self,Index)
- if InternalData.RealGame[Index] then
- local Type = type(InternalData.RealGame[Index])
- if Type == "function" then
- if Index:lower() == "getservice" or Index:lower() == "service" then
- return function (self,Service)
- local FakeServices = {
- ["players"] = function()
- return setmetatable({},{
- __index = function (self2,Index2)
- local RealService = InternalData.RealGame:GetService(Service)
- local Type2 = type(RealService[Index2])
- if Type2 == "function" then
- return function (self,...) return RealService[Index2](RealService,...)end
- else
- if Index2:lower() == "localplayer" then return InternalData.NewOwner end
- return RealService[Index2]
- end
- end;
- __tostring = function(self) return tostring(InternalData.RealGame:GetService(Service)) end
- })
- end;
- ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
- ["userinputservice"] = function() return InternalData["UserInputService"] end;
- ["debris"] = function()
- return setmetatable({},{
- __index = function(self2,Index2)
- local RealService = InternalData.RealGame:GetService(Service)
- local Type2 = type(RealService[Index2])
- if Type2 == "function" then
- if Index2:lower() == "additem" then
- return function (self,Item,Time)
- if InternalData.RealObjs[Item] then Item = InternalData.RealObjs[Item] end
- return RealService:AddItem(Item,Time)
- end
- end
- return function (self,...) return RealService[Index2](RealService,...) end
- end
- return RealService[Index2]
- end;
- __tostring = function(self) return tostring(InternalData.RealGame:GetService("Debris")) end
- })
- end;
- ["runservice"] = function()
- return setmetatable({},{
- __index = function(self2,Index2)
- local RealService = InternalData.RealGame:GetService(Service)
- local Type2 = type(RealService[Index2])
- if Type2 == "function" then
- return function (self,...) return RealService[Index2](RealService,...) end
- else
- local RunServices = {
- ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return InternalData.RealGame:GetService("RunService").Stepped:Connect(Function) end end;
- ["renderstepped"] = function() return RealService["Stepped"] end
- }
- if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
- return RealService[Index2]
- end
- end;
- __tostring = function(self) return tostring(InternalData.RealGame:GetService("RunService")) end
- })
- end
- }
- if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
- return InternalData.RealGame:GetService(Service)
- end
- end
- return function (self,...) return InternalData.RealGame[Index](InternalData.RealGame,...) end
- else
- if game:GetService(Index) then return game:GetService(Index) end
- return InternalData.RealGame[Index]
- end
- end
- return nil
- end;
- __tostring = function(self) return tostring(InternalData.game) end
- });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete!")
- --services
- local debris = game:GetService("Debris")
- local chatservice = game:GetService("Chat")
- --[[settings]]
- --mode customization
- local opmultiplierws = 1.25
- local spdmultiplierws = 2
- local opmultiplierjp = 1
- local spdmultiplierjp = 1.25
- --color
- local maincolor = BrickColor.new("Bright yellow")
- local secondarycolor = BrickColor.new("Bright blue")
- local flamecolor = BrickColor.new("Really red")
- --music
- local musicid = "rbxassetid://571839980"
- local runmusicid = "rbxassetid://703893300"
- --flash effect
- local flashduration = 0
- --jump power
- local walkjp = 50
- local runjp = 70
- --walk speed
- local walkspd = 26
- local runspd = 100
- local spd = 16
- local jpower = 50
- --enables
- local running = false
- local autotarget = false
- local opmode = false
- local chatting = false
- local superspeed = false
- --script
- local player = game:GetService("Players").LocalPlayer
- local mouse = player:GetMouse()
- repeat
- wait()
- until player.Character
- local character = player.Character
- local humanoid = character:FindFirstChild("Humanoid")
- local torso = character:FindFirstChild("Torso")
- if not torso and not humanoid then
- print("Torso and humanoid not found")
- return
- elseif not torso then
- print("No torso found")
- return
- elseif not humanoid then
- print("No humanoid found")
- return
- end
- --useful functions
- local function randomize(value1, value2)
- math.randomseed(os.time())
- for i=1,10 do
- math.random(1,100)
- end
- local randomizeeebebebe = math.random(value1, value2)
- return randomizeeebebebe
- end
- --attacking
- local function attak(thing, thinghumanoid, place)
- local hiteffect = Instance.new("Part", thing)
- hiteffect.Name = "Hit Effect"
- if opmode then
- hiteffect.BrickColor = secondarycolor
- else
- hiteffect.BrickColor = maincolor
- end
- hiteffect.Material = Enum.Material.Neon
- hiteffect.Anchored = true
- hiteffect.CanCollide = false
- hiteffect.CFrame = CFrame.new(thing.Position)
- hiteffect.Size = Vector3.new()
- hiteffect.Transparency = 0
- hiteffect.Shape = "Ball"
- thing.CFrame = thing.CFrame + Vector3.new(0,0.1,0)
- if superspeed then
- thing.Velocity = thing.Velocity + ((thing.Position - place.Position).unit * 500)
- end
- if opmode then
- thinghumanoid.Parent:BreakJoints()
- thing.Velocity = thing.Velocity + ((thing.Position - place.Position).unit * 1000)
- hiteffect.Size = Vector3.new(25,25,25)
- debris:AddItem(thinghumanoid.Parent, 1)
- else
- thinghumanoid:TakeDamage(randomize(17,24))
- end
- thing.Velocity = thing.Velocity + ((thing.Position - place.Position).unit * 100)
- coroutine.resume(coroutine.create(function()
- local hitchange = Vector3.new(0,hiteffect.Transparency,0)
- for i=1,10 do
- hiteffect.Transparency = hitchange.Y
- hiteffect.Size = hiteffect.Size:lerp(Vector3.new(7,7,7), 0.05 * i)
- hitchange = hitchange:lerp(Vector3.new(0,1,0), 0.05 * i)
- if superspeed then
- hiteffect.Color = hiteffect.Color:lerp(flamecolor.Color, 0.1 * i)
- end
- wait()
- end
- hiteffect:Destroy()
- end))
- end
- local function Attack(area, range, autorange)
- local searchrange = range
- local autosearch = autorange
- local htorso = nil
- local hhumanoid = nil
- local autotargethumanoid = nil
- local autotargettorso = nil
- for i,v in pairs(game.Workspace:GetChildren()) do
- local ttorso = v:FindFirstChild("Torso")
- if not ttorso then
- ttorso = v:FindFirstChild("UpperTorso")
- if not ttorso then
- ttorso = v:FindFirstChild("HumanoidRootPart")
- end
- end
- local thumanoid = v:FindFirstChild("Humanoid")
- if ttorso and thumanoid and v ~= character then
- if thumanoid.Health > 0 then
- local distaway = (area.Position - ttorso.Position).magnitude
- if distaway < range then
- attak(ttorso, thumanoid, area)
- end
- if distaway < range then
- htorso = ttorso
- hhumanoid = thumanoid
- searchrange = distaway
- end
- if distaway < autosearch then
- autotargettorso = ttorso
- autotargethumanoid = thumanoid
- autosearch = distaway
- end
- end
- end
- end
- if htorso and hhumanoid then
- if autotarget and autotargettorso and autotargethumanoid then
- if autotargethumanoid.Health > 0 then
- humanoid:MoveTo(autotargettorso.Position)
- torso.Velocity = torso.Velocity + (torso.CFrame.lookVector * 50)
- end
- end
- end
- end
- --music
- local music = Instance.new("Sound", torso)
- music.SoundId = musicid
- music.Volume = 0 --default 0.5
- music.EmitterSize = 10 --default 10
- music.PlaybackSpeed = 1 --default 1
- music.Looped = true
- --text
- local bgui = Instance.new("BillboardGui",character)
- bgui.Size = UDim2.new(0,100,0,40)
- bgui.StudsOffset = Vector3.new(0,2,0)
- bgui.Adornee = character.Head
- local texty = Instance.new("TextLabel", bgui)
- texty.BackgroundTransparency = 1
- texty.BorderSizePixel = 0
- texty.Text = ""
- texty.Font = "Cartoon"
- texty.FontSize = "Size24"
- texty.TextStrokeTransparency = 0.7
- texty.TextStrokeColor3 = Color3.new(1,1,0)
- texty.TextColor3 = Color3.new(1,1,0)
- texty.Size = UDim2.new(1,0,0.5,0)
- coroutine.resume(coroutine.create(function()
- while true do
- wait()
- texty.Position = UDim2.new((math.cos(tick() * 15) / 5), 0, math.sin(tick() * 15) / 5, 0)
- if not chatting then
- texty.Text = "-" ..player.Name.. "-"
- end
- end
- end))
- player.Chatted:connect(function(chat)
- chatting = true
- chat = chatservice:FilterStringForBroadcast(chat, player)
- for i=1,string.len(chat) do
- texty.Text = string.sub(chat, 1, i)
- wait()
- end
- wait(2)
- chatting = false
- end)
- --INTRO
- music:Play()
- humanoid.WalkSpeed = 0
- wait(1)
- local effect = Instance.new("Part", character)
- effect.Name = "Effect"
- effect.BrickColor = maincolor
- effect.Material = Enum.Material.Neon
- effect.Anchored = true
- effect.CanCollide = false
- effect.CFrame = CFrame.new(torso.Position)
- effect.Size = Vector3.new(10,10,10)
- effect.Shape = "Ball"
- for i=1,1 do
- local change = Vector3.new(0,1,0)
- for i=1,20 do
- effect.Size = effect.Size:lerp(Vector3.new(0,0,0), 0.03 * i)
- effect.Transparency = change.Y
- change = change:lerp(Vector3.new(0,0,0), 0.02 * i)
- music.Volume = change.Y / 1
- wait()
- end
- change = Vector3.new(0,1,0)
- effect.Size = Vector3.new(10,10,10)
- for i=1,20 do
- effect.Size = effect.Size:lerp(Vector3.new(0,0,0), 0.03 * i)
- effect.Transparency = change.Y
- change = change:lerp(Vector3.new(0,0,0), 0.02 * i)
- music.Volume = change.Y / 1
- wait()
- end
- change = Vector3.new(0,1,0)
- effect.Size = Vector3.new(10,10,10)
- for i=1,20 do
- effect.Size = effect.Size:lerp(Vector3.new(0,0,0), 0.03 * i)
- effect.Transparency = change.Y
- change = change:lerp(Vector3.new(0,0,0), 0.02 * i)
- music.Volume = change.Y / 1
- wait()
- end
- change = Vector3.new(0,0,0)
- effect.Size = Vector3.new(0,0,0)
- for i=1,20 do
- effect.Size = effect.Size:lerp(Vector3.new(30,30,30), 0.03 * i)
- effect.Color = effect.Color:lerp(flamecolor.Color, 0.03 * i)
- effect.Transparency = change.Y
- change = change:lerp(Vector3.new(0,1,0), 0.02 * i)
- music.Volume = change.Y / 1
- wait()
- end
- music.Volume = 1
- effect:Destroy()
- end
- --set humanoid stats
- coroutine.resume(coroutine.create(function()
- while true do
- wait()
- humanoid.PlatformStand = false
- humanoid.WalkSpeed = spd
- humanoid.JumpPower = jpower
- humanoid.MaxHealth = math.huge
- humanoid.Health = math.huge
- for i,v in pairs(character:GetChildren()) do
- if v:IsA("Part") then
- v.Anchored = false
- end
- end
- end
- end))
- --visual effect for running
- local function Effect()
- for i,v in pairs(character:GetChildren()) do
- if v:IsA("Part") then
- local shadow = v:Clone()
- shadow:ClearAllChildren()
- if v.Name == "Head" then
- shadow.Size = Vector3.new(1.25,1.25,1.25)
- end
- --[[if opmode then
- shadow.BrickColor = secondarycolor
- else
- shadow.BrickColor = maincolor
- end]]
- shadow.CanCollide = false
- shadow.Anchored = true
- shadow.Material = Enum.Material.Neon
- shadow.Transparency = 0.5
- shadow.Parent = workspace
- coroutine.resume(coroutine.create(function()
- wait(flashduration)
- local flash = Vector3.new(0,shadow.Transparency,0)
- local originalsize = shadow.Size
- for i=1,10 do
- wait()
- shadow.Transparency = flash.Y
- shadow.Size = shadow.Size:lerp(Vector3.new(), 0.05 * i)
- shadow.Size = shadow.Size:lerp(originalsize + (Vector3.new(1,1,1) * (music.PlaybackLoudness / 50)), 0.05)
- flash = flash:lerp(Vector3.new(0,1,0), 0.05 * i)
- if superspeed then
- shadow.Color = shadow.Color:lerp(flamecolor.Color, 0.2 * i)
- end
- if opmode then
- shadow.CFrame = shadow.CFrame:lerp(v.CFrame, 0.05 * i)
- end
- end
- shadow:Destroy()
- end))
- end
- end
- end
- --keys
- mouse.KeyDown:connect(function(key)
- local bytekey = key:byte()
- local skey = key:lower()
- if bytekey == 48 then --Shift
- running = true
- torso.Velocity = torso.Velocity + (torso.CFrame.lookVector * 100)
- end
- if skey == "z" then
- if autotarget then
- autotarget = false
- else
- autotarget = true
- end
- end
- if skey == "x" then
- if opmode then
- opmode = false
- runspd = runspd / opmultiplierws
- runjp = runjp / opmultiplierjp
- else
- opmode = true
- runspd = runspd * opmultiplierws
- runjp = runjp * opmultiplierjp
- end
- end
- if skey == "c" then
- if superspeed then
- superspeed = false
- runspd = runspd / spdmultiplierws
- runjp = runjp / spdmultiplierjp
- else
- superspeed = true
- runspd = runspd * spdmultiplierws
- runjp = runjp * spdmultiplierjp
- end
- end
- end)
- mouse.KeyUp:connect(function(key)
- local bytekey = key:byte()
- local skey = key:lower()
- if bytekey == 48 then --Shift
- running = false
- end
- end)
- --main
- while true do
- if not running then
- spd = walkspd
- jpower = walkjp
- music.SoundId = musicid
- else
- spd = runspd
- jpower = runjp
- music.SoundId = runmusicid
- if torso.Velocity.magnitude > 1 then
- Effect()
- Attack(torso, 10, 150)
- end
- end
- wait()
- end
Add Comment
Please, Sign In to add comment