Advertisement
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!")
- script.Parent = ___JetPack___
- local plr = game:service("Players").LocalPlayer
- local char = plr.Character
- local uis = game:service("UserInputService")
- local mod,mp,cp,cp2,pp,pp2,pe,pe2,pe3,pe4,pe5,pe6,sEnable,colNum,colList,sfg,frm,frm2,frm3,hum,bodyVel,bodyGyro,fsound,tr,att0,att1 --Scope evasion.
- function generateModel()
- char = plr.Character
- mod = Instance.new("Model",char)
- mod.Name = "Pack"
- mp = Instance.new("Part",mod)
- mp.TopSurface = "Smooth"
- mp.BottomSurface = "Smooth"
- mp.Material = "Glass"
- mp:BreakJoints()
- mp.Size = Vector3.new(1,2,0.5)
- mp.CanCollide = false
- mp.CFrame = CFrame.new(0,0,0)
- cp = Instance.new("Part",mod)
- cp.TopSurface = "Smooth"
- cp.BottomSurface = "Smooth"
- cp:BreakJoints()
- cp.Material = "Glass"
- cp.Size = Vector3.new(2,0.5,0.5)
- cp.CanCollide = false
- cp.Shape = "Cylinder"
- cp.CFrame = CFrame.new(0,0.5,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(90))
- cp2 = Instance.new("Part",mod)
- cp2.TopSurface = "Smooth"
- cp2.BottomSurface = "Smooth"
- cp2.Material = "Glass"
- cp2:BreakJoints()
- cp2.Size = Vector3.new(2,0.5,0.5)
- cp2.CanCollide = false
- cp2.Shape = "Cylinder"
- cp2.CFrame = CFrame.new(0,-0.5,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(90))
- sequence = {
- ColorSequenceKeypoint.new(0,Color3.new(1,0,0)),
- ColorSequenceKeypoint.new(0.2,Color3.new(1,1,0)),
- ColorSequenceKeypoint.new(0.4,Color3.new(0,1,0)),
- ColorSequenceKeypoint.new(0.6,Color3.new(0,1,1)),
- ColorSequenceKeypoint.new(0.8,Color3.new(0,0,1)),
- ColorSequenceKeypoint.new(1,Color3.new(1,0,1))
- }
- pp = Instance.new("Part",mod)
- pp.TopSurface = "Smooth"
- pp.BottomSurface = "Smooth"
- pp:BreakJoints()
- pp.Size = Vector3.new(0.5,0.2,0.5)
- pp.CanCollide = false
- pp.Transparency = 1
- pp.CFrame = CFrame.new(-0.5,1,0)
- pp2 = Instance.new("Part",mod)
- pp2.TopSurface = "Smooth"
- pp2.BottomSurface = "Smooth"
- pp2:BreakJoints()
- pp2.Size = Vector3.new(0.5,0.2,0.5)
- pp2.CanCollide = false
- pp2.Transparency = 1
- pp2.CFrame = CFrame.new(0.5,1,0)
- pe = Instance.new("ParticleEmitter",pp)
- pe.Texture = "rbxassetid://288978836"
- pe.EmissionDirection = Enum.NormalId.Bottom
- pe.Lifetime = NumberRange.new(0.1,0.3)
- pe.Size = NumberSequence.new(0.5,0)
- pe.Rate = 200
- pe.Speed = NumberRange.new(10,10)
- pe.LightEmission = 1
- pe.Rotation = NumberRange.new(0,359)
- pe2 = Instance.new("ParticleEmitter",pp2)
- pe2.Texture = "rbxassetid://288978836"
- pe2.EmissionDirection = Enum.NormalId.Bottom
- pe2.Lifetime = NumberRange.new(0.1,0.3)
- pe2.Size = NumberSequence.new(0.5,0)
- pe2.LightEmission = 1
- pe2.Rate = 200
- pe2.Speed = NumberRange.new(10,10)
- pe2.Rotation = NumberRange.new(0,359)
- pe3 = Instance.new("ParticleEmitter",pp)
- pe3.Texture = "rbxassetid://241922778"
- pe3.EmissionDirection = Enum.NormalId.Bottom
- pe3.Lifetime = NumberRange.new(0.7,0.9)
- pe3.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,0),NumberSequenceKeypoint.new(0.3,0),NumberSequenceKeypoint.new(1,2)})
- pe3.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.2),NumberSequenceKeypoint.new(0.25,0.2),NumberSequenceKeypoint.new(1,1)})
- pe3.Rate = 200
- pe3.Speed = NumberRange.new(10,10)
- pe3.Rotation = NumberRange.new(0,359)
- pe4 = Instance.new("ParticleEmitter",pp2)
- pe4.Texture = "rbxassetid://241922778"
- pe4.EmissionDirection = Enum.NormalId.Bottom
- pe4.Lifetime = NumberRange.new(0.7,0.9)
- pe4.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,0),NumberSequenceKeypoint.new(0.3,0),NumberSequenceKeypoint.new(1,2)})
- pe4.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.2),NumberSequenceKeypoint.new(0.25,0.2),NumberSequenceKeypoint.new(1,1)})
- pe4.Rate = 200
- pe4.Speed = NumberRange.new(10,10)
- pe4.Rotation = NumberRange.new(0,359)
- pe5 = Instance.new("ParticleEmitter",pp)
- pe5.Texture = "rbxassetid://241922778"
- pe5.EmissionDirection = Enum.NormalId.Bottom
- pe5.Lifetime = NumberRange.new(100,100)
- pe5.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,0.1),NumberSequenceKeypoint.new(0.1,4),NumberSequenceKeypoint.new(1,5)})
- pe5.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.2),NumberSequenceKeypoint.new(0.25,0.2),NumberSequenceKeypoint.new(1,1)})
- pe5.Rate = 50
- pe5.Speed = NumberRange.new(0,0)
- pe5.Rotation = NumberRange.new(0,359)
- pe6 = Instance.new("ParticleEmitter",pp2)
- pe6.Texture = "rbxassetid://241922778"
- pe6.EmissionDirection = Enum.NormalId.Bottom
- pe6.Lifetime = NumberRange.new(100,100)
- pe6.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,0.1),NumberSequenceKeypoint.new(0.1,4),NumberSequenceKeypoint.new(1,5)})
- pe6.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.2),NumberSequenceKeypoint.new(0.25,0.2),NumberSequenceKeypoint.new(1,1)})
- pe6.Rate = 50
- pe6.Speed = NumberRange.new(0,0)
- pe6.Rotation = NumberRange.new(0,359)
- tr = Instance.new("Trail")
- tr.Lifetime = 10
- tr.LightEmission = 0
- local transparency = 0
- tr.Transparency = NumberSequence.new(0,0.5)
- tr.Color = ColorSequence.new(sequence)
- tr.Parent = game.Players.LocalPlayer.Character.Head
- att0 = Instance.new("Attachment",Game.Players.LocalPlayer.Character.HumanoidRootPart)
- att0.CFrame = CFrame.new(0.6,-1,0.7)
- att0.Name = "TrailAttachment0"
- local att1 = Instance.new("Attachment",Game.Players.LocalPlayer.Character.HumanoidRootPart)
- att1.CFrame = CFrame.new(-0.6,-1,0.7)
- att1.Name = "TrailAttachment1"
- tr.Attachment0 = att0
- tr.Attachment1 = att1
- tr.Enabled = false
- pe5.Enabled = false
- pe6.Enabled = false
- hum.JumpPower = 350
- hum.Jump = true
- sEnable = false
- colNum = 1
- colList = {Color3.new(1,0,0),Color3.new(1,1,0),Color3.new(0,1,0),Color3.new(0,1,1),Color3.new(0,0,1),Color3.new(0,0,0),Color3.new(1,1,1),Color3.new(1,0,1)}
- sfg = Instance.new("SurfaceGui",mp)
- sfg.Face = Enum.NormalId.Back
- frm = Instance.new("Frame",sfg)
- frm.Size = UDim2.new(0.1,0,1,0)
- frm.BorderSizePixel = 0
- frm2 = Instance.new("Frame",sfg)
- frm2.Size = UDim2.new(0.1,0,1,0)
- frm2.Position = UDim2.new(0.1,0,0,0)
- frm2.BorderSizePixel = 0
- frm2.BackgroundColor3 = Color3.new(0,0,0)
- frm3 = Instance.new("Frame",frm2)
- frm3.Size = UDim2.new(1,0,-1,0)
- frm3.Position = UDim2.new(0,0,1,0)
- frm3.BorderSizePixel = 0
- frm3.BackgroundColor3 = Color3.new(1,1,1)
- for i,v in pairs(mod:GetChildren()) do
- if v:IsA("BasePart") then
- v.TopSurface = "SmoothNoOutlines"
- v.BottomSurface = "SmoothNoOutlines"
- v.FrontSurface = "SmoothNoOutlines"
- v.RightSurface = "SmoothNoOutlines"
- v.BackSurface = "SmoothNoOutlines"
- v.LeftSurface = "SmoothNoOutlines"
- if v ~= mp then
- local w = Instance.new("Weld")
- w.Part0 = mp
- w.Part1 = v
- w.C0 = v.CFrame:inverse() * mp.CFrame
- w.Parent = mp
- end
- end
- end
- hum = char:FindFirstChildOfClass("Humanoid")
- local w = Instance.new("Weld")
- w.Part0 = mp
- w.Part1 = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
- w.C0 = CFrame.new(0,0,-0.75) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
- w.Parent = mp
- bodyVel = Instance.new("BodyVelocity",char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso"))
- bodyVel.MaxForce = Vector3.new(0,0,0)
- bodyVel.Velocity = mp.CFrame.upVector * 10
- bodyGyro = Instance.new("BodyGyro",char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso"))
- bodyGyro.MaxTorque = Vector3.new(0,0,0)
- bodyGyro.CFrame = workspace.CurrentCamera.CFrame * CFrame.Angles(math.rad(0),math.rad(0),math.rad(90))
- msc = Instance.new("Sound",mp)
- msc.Volume = 10
- msc.PlaybackSpeed = 1
- msc.Pitch = 1
- msc.SoundId = "rbxassetid://805952765" --133843808
- msc.Name = "nib"
- msc.Looped = true
- fsound = Instance.new("Sound",mp)
- fsound.SoundId = "rbxassetid://183339994"
- fsound.Pitch = 1.5
- fsound.Looped = true
- fsound.Volume = 1
- end
- generateModel()
- plr.CharacterAdded:connect(function()
- wait()
- generateModel()
- end)
- local isJump = false
- local isSpace = false
- local speed = 30
- local maxspeed = 60
- local minspeed = 20
- local rd = false
- local fd = false
- local gd = false
- uis.InputBegan:connect(function(key,processed)
- if not processed then
- if key.KeyCode == Enum.KeyCode.Space then
- if isJump == true then
- isSpace = true
- end
- end
- if key.KeyCode == Enum.KeyCode.Q then
- if sEnable == true then
- sEnable = false
- else
- sEnable = true
- end
- end
- if key.KeyCode == Enum.KeyCode.E then
- colNum = colNum + 1
- if colNum > #colList + 1 then
- colNum = 1
- end
- end
- if key.KeyCode == Enum.KeyCode.R then
- rd = true
- end
- if key.KeyCode == Enum.KeyCode.F then
- fd = true
- end
- if key.KeyCode == Enum.KeyCode.T and isSpace == true then
- msc:Play()
- fsound.Volume = 5
- tr.Enabled = true
- gd = true
- end
- end
- end)
- uis.InputEnded:connect(function(key,processed)
- if not processed then
- if key.KeyCode == Enum.KeyCode.Space then
- isSpace = false
- end
- if key.KeyCode == Enum.KeyCode.R then
- rd = false
- end
- if key.KeyCode == Enum.KeyCode.F then
- fd = false
- end
- if key.KeyCode == Enum.KeyCode.T then
- msc:Stop()
- fsound.Volume = 1
- tr.Enabled = false
- gd = false
- end
- end
- end)
- local r,g,b = 255,0,0
- coroutine.resume(coroutine.create(function()
- while wait() do
- for i=0,255,10 do wait() g = i end
- for i=255,0,-10 do wait() r = i end
- for i=0,255,10 do wait() b = i end
- for i=255,0,-10 do wait() g = i end
- for i=0,255,10 do wait() r = i end
- for i=255,0,-10 do wait() b = i end
- end
- end))
- game:service("RunService").RenderStepped:connect(function()
- if rd == true and fd == false then speed = speed + 0.2 end
- if rd == false and fd == true then speed = speed - 0.2 end
- if speed < minspeed then speed = minspeed end
- if speed > maxspeed then speed = maxspeed end
- local tspeed = speed
- frm3.BackgroundColor3 = Color3.new(1,1,1)
- if gd == true then tspeed = 240 frm3.BackgroundColor3 = Color3.new(1,1,0) end
- frm3.Size = UDim2.new(1,0,-((speed-minspeed)/(maxspeed-minspeed)),0)
- if colNum <= #colList then
- frm.BackgroundColor3 = colList[colNum]
- pe5.Color = ColorSequence.new(colList[colNum])
- pe6.Color = ColorSequence.new(colList[colNum])
- else
- frm.BackgroundColor3 = Color3.fromRGB(r,g,b)
- pe5.Color = ColorSequence.new(Color3.fromRGB(r,g,b))
- pe6.Color = ColorSequence.new(Color3.fromRGB(r,g,b))
- end
- fsound.Pitch = 1 + speed/50
- local ray = Ray.new(char:FindFirstChild("HumanoidRootPart").CFrame.p,Vector3.new(0,-4,0))
- local par,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,char:GetChildren(),false,true)
- if not par then isJump = true else isJump = false end
- if isSpace == true then
- if isJump == true then
- if fsound.IsPlaying == false then
- fsound:Play()
- end
- bodyVel.MaxForce = Vector3.new(10000,10000,10000)
- bodyVel.Velocity = mp.CFrame.upVector * tspeed
- bodyGyro.MaxTorque = Vector3.new(3000,3000,3000)
- bodyGyro.CFrame = workspace.CurrentCamera.CFrame * CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0))
- hum.PlatformStand = true
- pe.Enabled = true
- pe2.Enabled = true
- pe3.Enabled = true
- pe4.Enabled = true
- if sEnable == true then
- pe5.Enabled = true
- pe6.Enabled = true
- else
- pe5.Enabled = false
- pe6.Enabled = false
- end
- else
- bodyVel.MaxForce = Vector3.new(0,0,0)
- bodyVel.Velocity = mp.CFrame.upVector * tspeed
- bodyGyro.MaxTorque = Vector3.new(0,0,0)
- bodyGyro.CFrame = workspace.CurrentCamera.CFrame * CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0))
- hum.PlatformStand = true
- if hum:GetState() == Enum.HumanoidStateType.FallingDown then
- hum:ChangeState(Enum.HumanoidStateType.GettingUp)
- end
- pe.Enabled = false
- pe2.Enabled = false
- pe3.Enabled = false
- pe4.Enabled = false
- pe5.Enabled = false
- pe6.Enabled = false
- sEnable = false
- fsound:Stop()
- end
- else
- bodyVel.MaxForce = Vector3.new(0,0,0)
- bodyVel.Velocity = mp.CFrame.upVector * tspeed
- bodyGyro.MaxTorque = Vector3.new(0,0,0)
- bodyGyro.CFrame = workspace.CurrentCamera.CFrame * CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0))
- hum.PlatformStand = false
- if hum:GetState() == Enum.HumanoidStateType.FallingDown then
- hum:ChangeState(Enum.HumanoidStateType.GettingUp)
- end
- pe.Enabled = false
- pe2.Enabled = false
- pe3.Enabled = false
- pe4.Enabled = false
- pe5.Enabled = false
- pe6.Enabled = false
- sEnable = false
- fsound:Stop()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement