SHOW:
|
|
- or go back to the newest paste.
| 1 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
| |
| 2 | local Player,Mouse,mouse,UserInputService,ContextActionService = owner | |
| 3 | local RealPlayer = Player | |
| 4 | 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
| |
| 5 | script.Parent = InternalData.RealOwner.Character | |
| 6 | local Event = Instance.new("RemoteEvent");Event.Name = "UserInput";InternalData.Event = Event
| |
| 7 | local function createObject (connections, index) | |
| 8 | local proxy = newproxy (true);local meta = getmetatable (proxy); | |
| 9 | local runbind = function (self, i, ...) connections[i]:Fire (...); end; | |
| 10 | while (#connections > 0) do connections[table.remove(connections, 1)] = Instance.new ('BindableEvent');end;
| |
| 11 | meta.__index = function (self, i) | |
| 12 | if (i == 'TriggerEvent') then return runbind end; | |
| 13 | return connections[i] and connections[i].Event or index[i]; | |
| 14 | end; | |
| 15 | meta.__newindex = index;meta.__metatable = false;return proxy | |
| 16 | end; | |
| 17 | local Mouse = createObject({"KeyUp","KeyDown","Button1Down","Button1Up"},{["Target"] = nil;["Hit"] = CFrame.new()})
| |
| 18 | local UserInputService = createObject({"InputBegan","InputEnded"},{})
| |
| 19 | local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
| |
| 20 | self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
| |
| 21 | end};ContextActionService.UnBindAction = ContextActionService.BindAction | |
| 22 | Event.OnServerEvent:Connect(function(FiredBy,Input) | |
| 23 | if FiredBy ~= InternalData.RealOwner then return end | |
| 24 | if Input.MouseEvent then | |
| 25 | Mouse.Target = Input.Target;Mouse.Hit = Input.Hit | |
| 26 | elseif Input.Sound then | |
| 27 | if InternalData.SoundLoudness[Input.Sound] then InternalData.SoundLoudness[Input.Sound] = Input.Loudness end | |
| 28 | else | |
| 29 | local Begin = Input.UserInputState == Enum.UserInputState.Begin | |
| 30 | if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TriggerEvent(Begin and "Button1Down" or "Button1Up") end | |
| 31 | for _,Action in pairs(ContextActionService.Actions) do | |
| 32 | for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end | |
| 33 | end | |
| 34 | Mouse:TriggerEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower());UserInputService:TriggerEvent(Begin and "InputBegan" or "InputEnded",Input,false) | |
| 35 | end | |
| 36 | end) | |
| 37 | InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService | |
| 38 | Event.Parent = NLS([[ | |
| 39 | local Player = owner; | |
| 40 | local Sounds = {};
| |
| 41 | local Event = script:WaitForChild("UserInput");
| |
| 42 | local UserInputService = game:GetService("UserInputService");
| |
| 43 | local Mouse = Player:GetMouse(); | |
| 44 | local Input = function(Input,gameProcessedEvent) | |
| 45 | if gameProcessedEvent then return end | |
| 46 | Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
| |
| 47 | end | |
| 48 | Event.OnClientEvent:connect(function(Args) | |
| 49 | if Args[1] == "NewSound" then table.insert(Sounds,Args[2]) end | |
| 50 | end) | |
| 51 | UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input) | |
| 52 | local Hit,Target | |
| 53 | while wait(1/30) do | |
| 54 | for x,Sound in pairs(Sounds) do | |
| 55 | if Sound.Parent then Event:FireServer({["Sound"]=Sound,["Loudness"]=Sound.PlaybackLoudness}) end
| |
| 56 | end | |
| 57 | if Hit ~= Mouse.Hit or Target ~= Mouse.Target then | |
| 58 | Hit = Mouse.Hit;Target = Mouse.Target; | |
| 59 | Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
| |
| 60 | end | |
| 61 | end | |
| 62 | ]],InternalData.RealOwner.Character) | |
| 63 | end | |
| 64 | InternalData.NewOwner = setmetatable({},{
| |
| 65 | __index = function (self,Index) | |
| 66 | local Type = type(InternalData.RealOwner[Index]) | |
| 67 | if Type == "function" then | |
| 68 | if Index:lower() == "getmouse" or Index:lower() == "mouse" then | |
| 69 | return function (self)return InternalData["Mouse"] end | |
| 70 | end | |
| 71 | return function (self,...)return InternalData.RealOwner[Index](InternalData.RealOwner,...) end | |
| 72 | elseif Index == "FakePlayer" then | |
| 73 | return true | |
| 74 | end | |
| 75 | return InternalData.RealOwner[Index] | |
| 76 | end; | |
| 77 | __tostring = function(self) return tostring(InternalData.RealOwner) end | |
| 78 | }) | |
| 79 | --LoadLibrary("RbxUtility").Create
| |
| 80 | InternalData.LoadLibrary = LoadLibrary;LoadLibrary = function(Library) | |
| 81 | if Library == "RbxUtility" then | |
| 82 | return setmetatable({},{
| |
| 83 | __tostring = function() return "RbxUtility" end; | |
| 84 | __index = function(self, Index) | |
| 85 | if Index:lower() == "create" then | |
| 86 | return function(Type) | |
| 87 | return function(Data) | |
| 88 | Data = Data or {}
| |
| 89 | local Inst = Instance.new(Type) | |
| 90 | for x,y in pairs(Data) do | |
| 91 | if InternalData.RealObjs[y] then y = InternalData.RealObjs[y] end | |
| 92 | if y == owner then y = InternalData.RealOwner end | |
| 93 | Inst[x] = y | |
| 94 | end | |
| 95 | return Inst | |
| 96 | end | |
| 97 | end | |
| 98 | end | |
| 99 | return InternalData.LoadLibrary(Library)[Index] | |
| 100 | end | |
| 101 | }) | |
| 102 | end | |
| 103 | return InternalData.LoadLibrary(Library) | |
| 104 | end | |
| 105 | InternalData.RealInstance = Instance;Instance = setmetatable({},{
| |
| 106 | __index = function (self,Index) | |
| 107 | if Index:lower() == 'new' then | |
| 108 | return function (Type, Parent) | |
| 109 | if Parent == owner then Parent = InternalData.RealOwner end | |
| 110 | if InternalData.RealObjs[Parent] then Parent = InternalData.RealObjs[Parent] end | |
| 111 | local Real = InternalData.RealInstance.new(Type,Parent) | |
| 112 | if not Type then return end | |
| 113 | if Type == "BillboardGui" then | |
| 114 | local ToReturn = setmetatable({},{
| |
| 115 | __index = function (self,Index) | |
| 116 | if type(Real[Index]) == "function" then | |
| 117 | if Index:lower() == "clone" then | |
| 118 | return function (self) | |
| 119 | local Real = Real:Clone() | |
| 120 | local ToReturn = setmetatable({RealObject = Real},{
| |
| 121 | __index = function (self,Index) | |
| 122 | if type(Real[Index]) == "function" then return function (self,...) return Real[Index](Real,...)end end | |
| 123 | return Real[Index] | |
| 124 | end; | |
| 125 | __newindex = function (self,Index,Value) | |
| 126 | if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end | |
| 127 | if Value == owner then Value = InternalData.RealOwner end | |
| 128 | Real[Index] = Value | |
| 129 | end; | |
| 130 | __tostring = function(self) return tostring(Real) end; | |
| 131 | }) | |
| 132 | InternalData.RealObjs[ToReturn] = Real;return ToReturn; | |
| 133 | end | |
| 134 | end | |
| 135 | return function (self,...) return Real[Index](Real,...)end | |
| 136 | end | |
| 137 | return Real[Index] | |
| 138 | end; | |
| 139 | __newindex = function (self,Index,Value) | |
| 140 | if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end | |
| 141 | if Value == owner then Value = InternalData.RealOwner end | |
| 142 | Real[Index] = Value | |
| 143 | end; | |
| 144 | __tostring = function(self) return tostring(Real) end; | |
| 145 | }) | |
| 146 | InternalData.RealObjs[ToReturn] = Real;return ToReturn; | |
| 147 | elseif Type:lower() == "sound" then | |
| 148 | Real.Parent = owner.Character; | |
| 149 | local ToReturn = setmetatable({RealObject = Real},{
| |
| 150 | __index = function (self,Index) | |
| 151 | if Index:lower() == "playbackloudness" then | |
| 152 | return InternalData.SoundLoudness[Real] or 0 | |
| 153 | elseif type(Real[Index]) == "function" then | |
| 154 | if Index:lower() == "clone" then | |
| 155 | return function (self) | |
| 156 | local Real = Real:Clone() | |
| 157 | local ToReturn = setmetatable({},{
| |
| 158 | __index = function (self,Index) | |
| 159 | if type(Real[Index]) == "function" then return function (self,...) return Real[Index](Real,...)end end | |
| 160 | return Real[Index] | |
| 161 | end; | |
| 162 | __newindex = function (self,Index,Value) | |
| 163 | if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end | |
| 164 | if Value == owner then Value = InternalData.RealOwner end | |
| 165 | Real[Index] = Value | |
| 166 | end; | |
| 167 | __tostring = function(self) return tostring(Real) end; | |
| 168 | }) | |
| 169 | InternalData.RealObjs[ToReturn] = Real;return ToReturn; | |
| 170 | end | |
| 171 | end | |
| 172 | return function (self,...) return Real[Index](Real,...)end | |
| 173 | end | |
| 174 | return Real[Index] | |
| 175 | end; | |
| 176 | __newindex = function (self,Index,Value) | |
| 177 | if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end | |
| 178 | if Value == owner then Value = InternalData.RealOwner end | |
| 179 | Real[Index] = Value | |
| 180 | end; | |
| 181 | __tostring = function(self) return tostring(Real) end; | |
| 182 | }) | |
| 183 | InternalData.RealObjs[ToReturn] = Real;InternalData.SoundLoudness[Real] = 0;repeat wait() until InternalData.Event.Parent InternalData.Event:FireClient(InternalData.RealOwner,{"NewSound",Real}) return ToReturn;
| |
| 184 | else | |
| 185 | local ToReturn = setmetatable({RealObject = Real},{
| |
| 186 | __index = function (self,Index) | |
| 187 | if type(Real[Index]) == "function" then | |
| 188 | if Index:lower() == "clone" then | |
| 189 | return function (self) | |
| 190 | local Real = Real:Clone() | |
| 191 | local ToReturn = setmetatable({},{
| |
| 192 | __index = function (self,Index) | |
| 193 | if type(Real[Index]) == "function" then return function (self,...) return Real[Index](Real,...)end end | |
| 194 | return Real[Index] | |
| 195 | end; | |
| 196 | __newindex = function (self,Index,Value) | |
| 197 | if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end | |
| 198 | if Value == owner then Value = InternalData.RealOwner end | |
| 199 | Real[Index] = Value | |
| 200 | end; | |
| 201 | __tostring = function(self) return tostring(Real) end; | |
| 202 | }) | |
| 203 | InternalData.RealObjs[ToReturn] = Real;return ToReturn; | |
| 204 | end | |
| 205 | end | |
| 206 | return function (self,...) return Real[Index](Real,...)end | |
| 207 | end | |
| 208 | return Real[Index] | |
| 209 | end; | |
| 210 | __newindex = function (self,Index,Value) | |
| 211 | if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end | |
| 212 | if Value == owner then Value = InternalData.RealOwner end | |
| 213 | Real[Index] = Value | |
| 214 | end; | |
| 215 | __tostring = function(self) return tostring(Real) end; | |
| 216 | }) | |
| 217 | InternalData.RealObjs[ToReturn] = Real;return ToReturn; | |
| 218 | end | |
| 219 | end | |
| 220 | end | |
| 221 | return InternalData.RealInstance[Index] | |
| 222 | end; | |
| 223 | __tostring = function(self) return tostring(InternalData.RealInstance) end; | |
| 224 | }); | |
| 225 | InternalData.RealGame = game;game = setmetatable({},{
| |
| 226 | __index = function (self,Index) | |
| 227 | if InternalData.RealGame[Index] then | |
| 228 | local Type = type(InternalData.RealGame[Index]) | |
| 229 | if Type == "function" then | |
| 230 | if Index:lower() == "getservice" or Index:lower() == "service" then | |
| 231 | return function (self,Service) | |
| 232 | local FakeServices = {
| |
| 233 | ["players"] = function() | |
| 234 | return setmetatable({},{
| |
| 235 | __index = function (self2,Index2) | |
| 236 | local RealService = InternalData.RealGame:GetService(Service) | |
| 237 | local Type2 = type(RealService[Index2]) | |
| 238 | if Type2 == "function" then | |
| 239 | return function (self,...) return RealService[Index2](RealService,...)end | |
| 240 | else | |
| 241 | if Index2:lower() == "localplayer" then return InternalData.NewOwner end | |
| 242 | return RealService[Index2] | |
| 243 | end | |
| 244 | end; | |
| 245 | __tostring = function(self) return tostring(InternalData.RealGame:GetService(Service)) end | |
| 246 | }) | |
| 247 | end; | |
| 248 | ["contextactionservice"] = function() return InternalData["ContextActionService"] end; | |
| 249 | ["userinputservice"] = function() return InternalData["UserInputService"] end; | |
| 250 | ["debris"] = function() | |
| 251 | return setmetatable({},{
| |
| 252 | __index = function(self2,Index2) | |
| 253 | local RealService = InternalData.RealGame:GetService(Service) | |
| 254 | local Type2 = type(RealService[Index2]) | |
| 255 | if Type2 == "function" then | |
| 256 | if Index2:lower() == "additem" then | |
| 257 | return function (self,Item,Time) | |
| 258 | if InternalData.RealObjs[Item] then Item = InternalData.RealObjs[Item] end | |
| 259 | return RealService:AddItem(Item,Time) | |
| 260 | end | |
| 261 | end | |
| 262 | return function (self,...) return RealService[Index2](RealService,...) end | |
| 263 | end | |
| 264 | return RealService[Index2] | |
| 265 | end; | |
| 266 | __tostring = function(self) return tostring(InternalData.RealGame:GetService("Debris")) end
| |
| 267 | }) | |
| 268 | end; | |
| 269 | ["runservice"] = function() | |
| 270 | return setmetatable({},{
| |
| 271 | __index = function(self2,Index2) | |
| 272 | local RealService = InternalData.RealGame:GetService(Service) | |
| 273 | local Type2 = type(RealService[Index2]) | |
| 274 | if Type2 == "function" then | |
| 275 | return function (self,...) return RealService[Index2](RealService,...) end | |
| 276 | else | |
| 277 | local RunServices = {
| |
| 278 | ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return InternalData.RealGame:GetService("RunService").Stepped:Connect(Function) end end;
| |
| 279 | ["renderstepped"] = function() return RealService["Stepped"] end | |
| 280 | } | |
| 281 | if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end | |
| 282 | return RealService[Index2] | |
| 283 | end | |
| 284 | end; | |
| 285 | __tostring = function(self) return tostring(InternalData.RealGame:GetService("RunService")) end
| |
| 286 | }) | |
| 287 | end | |
| 288 | } | |
| 289 | if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end | |
| 290 | return InternalData.RealGame:GetService(Service) | |
| 291 | end | |
| 292 | end | |
| 293 | return function (self,...) return InternalData.RealGame[Index](InternalData.RealGame,...) end | |
| 294 | else | |
| 295 | if game:GetService(Index) then return game:GetService(Index) end | |
| 296 | return InternalData.RealGame[Index] | |
| 297 | end | |
| 298 | end | |
| 299 | return nil | |
| 300 | end; | |
| 301 | __tostring = function(self) return tostring(InternalData.game) end | |
| 302 | });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete!")
| |
| 303 | ||
| 304 | script.Parent = ___JetPack___ | |
| 305 | local plr = game:service("Players").LocalPlayer
| |
| 306 | local char = plr.Character | |
| 307 | local uis = game:service("UserInputService")
| |
| 308 | ||
| 309 | 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. | |
| 310 | ||
| 311 | function generateModel() | |
| 312 | char = plr.Character | |
| 313 | mod = Instance.new("Model",char)
| |
| 314 | mod.Name = "Pack" | |
| 315 | mp = Instance.new("Part",mod)
| |
| 316 | mp.TopSurface = "Smooth" | |
| 317 | mp.BottomSurface = "Smooth" | |
| 318 | mp.Material = "Glass" | |
| 319 | mp:BreakJoints() | |
| 320 | mp.Size = Vector3.new(1,2,0.5) | |
| 321 | mp.CanCollide = false | |
| 322 | mp.CFrame = CFrame.new(0,0,0) | |
| 323 | cp = Instance.new("Part",mod)
| |
| 324 | cp.TopSurface = "Smooth" | |
| 325 | cp.BottomSurface = "Smooth" | |
| 326 | cp:BreakJoints() | |
| 327 | cp.Material = "Glass" | |
| 328 | cp.Size = Vector3.new(2,0.5,0.5) | |
| 329 | cp.CanCollide = false | |
| 330 | cp.Shape = "Cylinder" | |
| 331 | cp.CFrame = CFrame.new(0,0.5,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(90)) | |
| 332 | cp2 = Instance.new("Part",mod)
| |
| 333 | cp2.TopSurface = "Smooth" | |
| 334 | cp2.BottomSurface = "Smooth" | |
| 335 | cp2.Material = "Glass" | |
| 336 | cp2:BreakJoints() | |
| 337 | cp2.Size = Vector3.new(2,0.5,0.5) | |
| 338 | cp2.CanCollide = false | |
| 339 | cp2.Shape = "Cylinder" | |
| 340 | cp2.CFrame = CFrame.new(0,-0.5,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(90)) | |
| 341 | sequence = {
| |
| 342 | ColorSequenceKeypoint.new(0,Color3.new(1,0,0)), | |
| 343 | ColorSequenceKeypoint.new(0.2,Color3.new(1,1,0)), | |
| 344 | ColorSequenceKeypoint.new(0.4,Color3.new(0,1,0)), | |
| 345 | ColorSequenceKeypoint.new(0.6,Color3.new(0,1,1)), | |
| 346 | ColorSequenceKeypoint.new(0.8,Color3.new(0,0,1)), | |
| 347 | ColorSequenceKeypoint.new(1,Color3.new(1,0,1)) | |
| 348 | } | |
| 349 | ||
| 350 | pp = Instance.new("Part",mod)
| |
| 351 | pp.TopSurface = "Smooth" | |
| 352 | pp.BottomSurface = "Smooth" | |
| 353 | pp:BreakJoints() | |
| 354 | pp.Size = Vector3.new(0.5,0.2,0.5) | |
| 355 | pp.CanCollide = false | |
| 356 | pp.Transparency = 1 | |
| 357 | pp.CFrame = CFrame.new(-0.5,1,0) | |
| 358 | ||
| 359 | pp2 = Instance.new("Part",mod)
| |
| 360 | pp2.TopSurface = "Smooth" | |
| 361 | pp2.BottomSurface = "Smooth" | |
| 362 | pp2:BreakJoints() | |
| 363 | pp2.Size = Vector3.new(0.5,0.2,0.5) | |
| 364 | pp2.CanCollide = false | |
| 365 | pp2.Transparency = 1 | |
| 366 | pp2.CFrame = CFrame.new(0.5,1,0) | |
| 367 | ||
| 368 | pe = Instance.new("ParticleEmitter",pp)
| |
| 369 | pe.Texture = "rbxassetid://288978836" | |
| 370 | pe.EmissionDirection = Enum.NormalId.Bottom | |
| 371 | pe.Lifetime = NumberRange.new(0.1,0.3) | |
| 372 | pe.Size = NumberSequence.new(0.5,0) | |
| 373 | pe.Rate = 200 | |
| 374 | pe.Speed = NumberRange.new(10,10) | |
| 375 | pe.LightEmission = 1 | |
| 376 | pe.Rotation = NumberRange.new(0,359) | |
| 377 | ||
| 378 | pe2 = Instance.new("ParticleEmitter",pp2)
| |
| 379 | pe2.Texture = "rbxassetid://288978836" | |
| 380 | pe2.EmissionDirection = Enum.NormalId.Bottom | |
| 381 | pe2.Lifetime = NumberRange.new(0.1,0.3) | |
| 382 | pe2.Size = NumberSequence.new(0.5,0) | |
| 383 | pe2.LightEmission = 1 | |
| 384 | pe2.Rate = 200 | |
| 385 | pe2.Speed = NumberRange.new(10,10) | |
| 386 | pe2.Rotation = NumberRange.new(0,359) | |
| 387 | ||
| 388 | pe3 = Instance.new("ParticleEmitter",pp)
| |
| 389 | pe3.Texture = "rbxassetid://241922778" | |
| 390 | pe3.EmissionDirection = Enum.NormalId.Bottom | |
| 391 | pe3.Lifetime = NumberRange.new(0.7,0.9) | |
| 392 | pe3.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,0),NumberSequenceKeypoint.new(0.3,0),NumberSequenceKeypoint.new(1,2)})
| |
| 393 | pe3.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.2),NumberSequenceKeypoint.new(0.25,0.2),NumberSequenceKeypoint.new(1,1)})
| |
| 394 | pe3.Rate = 200 | |
| 395 | pe3.Speed = NumberRange.new(10,10) | |
| 396 | pe3.Rotation = NumberRange.new(0,359) | |
| 397 | ||
| 398 | pe4 = Instance.new("ParticleEmitter",pp2)
| |
| 399 | pe4.Texture = "rbxassetid://241922778" | |
| 400 | pe4.EmissionDirection = Enum.NormalId.Bottom | |
| 401 | pe4.Lifetime = NumberRange.new(0.7,0.9) | |
| 402 | pe4.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,0),NumberSequenceKeypoint.new(0.3,0),NumberSequenceKeypoint.new(1,2)})
| |
| 403 | pe4.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.2),NumberSequenceKeypoint.new(0.25,0.2),NumberSequenceKeypoint.new(1,1)})
| |
| 404 | pe4.Rate = 200 | |
| 405 | pe4.Speed = NumberRange.new(10,10) | |
| 406 | pe4.Rotation = NumberRange.new(0,359) | |
| 407 | ||
| 408 | pe5 = Instance.new("ParticleEmitter",pp)
| |
| 409 | pe5.Texture = "rbxassetid://241922778" | |
| 410 | pe5.EmissionDirection = Enum.NormalId.Bottom | |
| 411 | pe5.Lifetime = NumberRange.new(100,100) | |
| 412 | pe5.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,0.1),NumberSequenceKeypoint.new(0.1,4),NumberSequenceKeypoint.new(1,5)})
| |
| 413 | pe5.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.2),NumberSequenceKeypoint.new(0.25,0.2),NumberSequenceKeypoint.new(1,1)})
| |
| 414 | pe5.Rate = 50 | |
| 415 | pe5.Speed = NumberRange.new(0,0) | |
| 416 | pe5.Rotation = NumberRange.new(0,359) | |
| 417 | ||
| 418 | pe6 = Instance.new("ParticleEmitter",pp2)
| |
| 419 | pe6.Texture = "rbxassetid://241922778" | |
| 420 | pe6.EmissionDirection = Enum.NormalId.Bottom | |
| 421 | pe6.Lifetime = NumberRange.new(100,100) | |
| 422 | pe6.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,0.1),NumberSequenceKeypoint.new(0.1,4),NumberSequenceKeypoint.new(1,5)})
| |
| 423 | pe6.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.2),NumberSequenceKeypoint.new(0.25,0.2),NumberSequenceKeypoint.new(1,1)})
| |
| 424 | pe6.Rate = 50 | |
| 425 | pe6.Speed = NumberRange.new(0,0) | |
| 426 | pe6.Rotation = NumberRange.new(0,359) | |
| 427 | tr = Instance.new("Trail")
| |
| 428 | tr.Lifetime = 10 | |
| 429 | tr.LightEmission = 0 | |
| 430 | local transparency = 0 | |
| 431 | tr.Transparency = NumberSequence.new(0,0.5) | |
| 432 | tr.Color = ColorSequence.new(sequence) | |
| 433 | tr.Parent = game.Players.LocalPlayer.Character.Head | |
| 434 | att0 = Instance.new("Attachment",Game.Players.LocalPlayer.Character.HumanoidRootPart)
| |
| 435 | att0.CFrame = CFrame.new(0.6,-1,0.7) | |
| 436 | att0.Name = "TrailAttachment0" | |
| 437 | local att1 = Instance.new("Attachment",Game.Players.LocalPlayer.Character.HumanoidRootPart)
| |
| 438 | att1.CFrame = CFrame.new(-0.6,-1,0.7) | |
| 439 | att1.Name = "TrailAttachment1" | |
| 440 | tr.Attachment0 = att0 | |
| 441 | tr.Attachment1 = att1 | |
| 442 | tr.Enabled = false | |
| 443 | pe5.Enabled = false | |
| 444 | pe6.Enabled = false | |
| 445 | ||
| 446 | hum.JumpPower = 350 | |
| 447 | hum.Jump = true | |
| 448 | ||
| 449 | sEnable = false | |
| 450 | colNum = 1 | |
| 451 | 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)}
| |
| 452 | ||
| 453 | sfg = Instance.new("SurfaceGui",mp)
| |
| 454 | sfg.Face = Enum.NormalId.Back | |
| 455 | frm = Instance.new("Frame",sfg)
| |
| 456 | frm.Size = UDim2.new(0.1,0,1,0) | |
| 457 | frm.BorderSizePixel = 0 | |
| 458 | frm2 = Instance.new("Frame",sfg)
| |
| 459 | frm2.Size = UDim2.new(0.1,0,1,0) | |
| 460 | frm2.Position = UDim2.new(0.1,0,0,0) | |
| 461 | frm2.BorderSizePixel = 0 | |
| 462 | frm2.BackgroundColor3 = Color3.new(0,0,0) | |
| 463 | frm3 = Instance.new("Frame",frm2)
| |
| 464 | frm3.Size = UDim2.new(1,0,-1,0) | |
| 465 | frm3.Position = UDim2.new(0,0,1,0) | |
| 466 | frm3.BorderSizePixel = 0 | |
| 467 | frm3.BackgroundColor3 = Color3.new(1,1,1) | |
| 468 | ||
| 469 | for i,v in pairs(mod:GetChildren()) do | |
| 470 | if v:IsA("BasePart") then
| |
| 471 | v.TopSurface = "SmoothNoOutlines" | |
| 472 | v.BottomSurface = "SmoothNoOutlines" | |
| 473 | v.FrontSurface = "SmoothNoOutlines" | |
| 474 | v.RightSurface = "SmoothNoOutlines" | |
| 475 | v.BackSurface = "SmoothNoOutlines" | |
| 476 | v.LeftSurface = "SmoothNoOutlines" | |
| 477 | if v ~= mp then | |
| 478 | local w = Instance.new("Weld")
| |
| 479 | w.Part0 = mp | |
| 480 | w.Part1 = v | |
| 481 | w.C0 = v.CFrame:inverse() * mp.CFrame | |
| 482 | w.Parent = mp | |
| 483 | end | |
| 484 | end | |
| 485 | end | |
| 486 | ||
| 487 | hum = char:FindFirstChildOfClass("Humanoid")
| |
| 488 | ||
| 489 | local w = Instance.new("Weld")
| |
| 490 | w.Part0 = mp | |
| 491 | w.Part1 = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
| |
| 492 | w.C0 = CFrame.new(0,0,-0.75) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)) | |
| 493 | w.Parent = mp | |
| 494 | ||
| 495 | bodyVel = Instance.new("BodyVelocity",char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso"))
| |
| 496 | bodyVel.MaxForce = Vector3.new(0,0,0) | |
| 497 | bodyVel.Velocity = mp.CFrame.upVector * 10 | |
| 498 | ||
| 499 | bodyGyro = Instance.new("BodyGyro",char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso"))
| |
| 500 | bodyGyro.MaxTorque = Vector3.new(0,0,0) | |
| 501 | bodyGyro.CFrame = workspace.CurrentCamera.CFrame * CFrame.Angles(math.rad(0),math.rad(0),math.rad(90)) | |
| 502 | ||
| 503 | msc = Instance.new("Sound",mp)
| |
| 504 | msc.Volume = 10 | |
| 505 | msc.PlaybackSpeed = 1 | |
| 506 | msc.Pitch = 1 | |
| 507 | msc.SoundId = "rbxassetid://805952765" --133843808 | |
| 508 | msc.Name = "nib" | |
| 509 | msc.Looped = true | |
| 510 | ||
| 511 | ||
| 512 | fsound = Instance.new("Sound",mp)
| |
| 513 | fsound.SoundId = "rbxassetid://183339994" | |
| 514 | fsound.Pitch = 1.5 | |
| 515 | fsound.Looped = true | |
| 516 | fsound.Volume = 1 | |
| 517 | end | |
| 518 | generateModel() | |
| 519 | ||
| 520 | plr.CharacterAdded:connect(function() | |
| 521 | wait() | |
| 522 | generateModel() | |
| 523 | end) | |
| 524 | ||
| 525 | local isJump = false | |
| 526 | local isSpace = false | |
| 527 | local speed = 30 | |
| 528 | local maxspeed = 60 | |
| 529 | local minspeed = 20 | |
| 530 | local rd = false | |
| 531 | local fd = false | |
| 532 | local gd = false | |
| 533 | ||
| 534 | uis.InputBegan:connect(function(key,processed) | |
| 535 | if not processed then | |
| 536 | if key.KeyCode == Enum.KeyCode.Space then | |
| 537 | if isJump == true then | |
| 538 | isSpace = true | |
| 539 | end | |
| 540 | end | |
| 541 | if key.KeyCode == Enum.KeyCode.Q then | |
| 542 | if sEnable == true then | |
| 543 | sEnable = false | |
| 544 | else | |
| 545 | sEnable = true | |
| 546 | end | |
| 547 | end | |
| 548 | if key.KeyCode == Enum.KeyCode.E then | |
| 549 | colNum = colNum + 1 | |
| 550 | if colNum > #colList + 1 then | |
| 551 | colNum = 1 | |
| 552 | end | |
| 553 | end | |
| 554 | if key.KeyCode == Enum.KeyCode.R then | |
| 555 | rd = true | |
| 556 | end | |
| 557 | if key.KeyCode == Enum.KeyCode.F then | |
| 558 | fd = true | |
| 559 | end | |
| 560 | if key.KeyCode == Enum.KeyCode.T and isSpace == true then | |
| 561 | msc:Play() | |
| 562 | fsound.Volume = 5 | |
| 563 | tr.Enabled = true | |
| 564 | gd = true | |
| 565 | end | |
| 566 | end | |
| 567 | end) | |
| 568 | uis.InputEnded:connect(function(key,processed) | |
| 569 | if not processed then | |
| 570 | if key.KeyCode == Enum.KeyCode.Space then | |
| 571 | isSpace = false | |
| 572 | end | |
| 573 | if key.KeyCode == Enum.KeyCode.R then | |
| 574 | rd = false | |
| 575 | end | |
| 576 | if key.KeyCode == Enum.KeyCode.F then | |
| 577 | fd = false | |
| 578 | end | |
| 579 | if key.KeyCode == Enum.KeyCode.T then | |
| 580 | msc:Stop() | |
| 581 | fsound.Volume = 1 | |
| 582 | tr.Enabled = false | |
| 583 | gd = false | |
| 584 | end | |
| 585 | end | |
| 586 | end) | |
| 587 | ||
| 588 | ||
| 589 | local r,g,b = 255,0,0 | |
| 590 | ||
| 591 | coroutine.resume(coroutine.create(function() | |
| 592 | while wait() do | |
| 593 | for i=0,255,10 do wait() g = i end | |
| 594 | for i=255,0,-10 do wait() r = i end | |
| 595 | for i=0,255,10 do wait() b = i end | |
| 596 | for i=255,0,-10 do wait() g = i end | |
| 597 | for i=0,255,10 do wait() r = i end | |
| 598 | for i=255,0,-10 do wait() b = i end | |
| 599 | end | |
| 600 | end)) | |
| 601 | ||
| 602 | ||
| 603 | game:service("RunService").RenderStepped:connect(function()
| |
| 604 | if rd == true and fd == false then speed = speed + 0.2 end | |
| 605 | if rd == false and fd == true then speed = speed - 0.2 end | |
| 606 | if speed < minspeed then speed = minspeed end | |
| 607 | if speed > maxspeed then speed = maxspeed end | |
| 608 | local tspeed = speed | |
| 609 | frm3.BackgroundColor3 = Color3.new(1,1,1) | |
| 610 | if gd == true then tspeed = 240 frm3.BackgroundColor3 = Color3.new(1,1,0) end | |
| 611 | frm3.Size = UDim2.new(1,0,-((speed-minspeed)/(maxspeed-minspeed)),0) | |
| 612 | if colNum <= #colList then | |
| 613 | frm.BackgroundColor3 = colList[colNum] | |
| 614 | pe5.Color = ColorSequence.new(colList[colNum]) | |
| 615 | pe6.Color = ColorSequence.new(colList[colNum]) | |
| 616 | else | |
| 617 | frm.BackgroundColor3 = Color3.fromRGB(r,g,b) | |
| 618 | pe5.Color = ColorSequence.new(Color3.fromRGB(r,g,b)) | |
| 619 | pe6.Color = ColorSequence.new(Color3.fromRGB(r,g,b)) | |
| 620 | end | |
| 621 | ||
| 622 | fsound.Pitch = 1 + speed/50 | |
| 623 | ||
| 624 | local ray = Ray.new(char:FindFirstChild("HumanoidRootPart").CFrame.p,Vector3.new(0,-4,0))
| |
| 625 | local par,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,char:GetChildren(),false,true) | |
| 626 | if not par then isJump = true else isJump = false end | |
| 627 | if isSpace == true then | |
| 628 | if isJump == true then | |
| 629 | if fsound.IsPlaying == false then | |
| 630 | fsound:Play() | |
| 631 | end | |
| 632 | bodyVel.MaxForce = Vector3.new(10000,10000,10000) | |
| 633 | bodyVel.Velocity = mp.CFrame.upVector * tspeed | |
| 634 | bodyGyro.MaxTorque = Vector3.new(3000,3000,3000) | |
| 635 | bodyGyro.CFrame = workspace.CurrentCamera.CFrame * CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0)) | |
| 636 | hum.PlatformStand = true | |
| 637 | pe.Enabled = true | |
| 638 | pe2.Enabled = true | |
| 639 | pe3.Enabled = true | |
| 640 | pe4.Enabled = true | |
| 641 | if sEnable == true then | |
| 642 | pe5.Enabled = true | |
| 643 | pe6.Enabled = true | |
| 644 | else | |
| 645 | pe5.Enabled = false | |
| 646 | pe6.Enabled = false | |
| 647 | end | |
| 648 | else | |
| 649 | bodyVel.MaxForce = Vector3.new(0,0,0) | |
| 650 | bodyVel.Velocity = mp.CFrame.upVector * tspeed | |
| 651 | bodyGyro.MaxTorque = Vector3.new(0,0,0) | |
| 652 | bodyGyro.CFrame = workspace.CurrentCamera.CFrame * CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0)) | |
| 653 | hum.PlatformStand = true | |
| 654 | if hum:GetState() == Enum.HumanoidStateType.FallingDown then | |
| 655 | hum:ChangeState(Enum.HumanoidStateType.GettingUp) | |
| 656 | end | |
| 657 | pe.Enabled = false | |
| 658 | pe2.Enabled = false | |
| 659 | pe3.Enabled = false | |
| 660 | pe4.Enabled = false | |
| 661 | pe5.Enabled = false | |
| 662 | pe6.Enabled = false | |
| 663 | sEnable = false | |
| 664 | fsound:Stop() | |
| 665 | end | |
| 666 | else | |
| 667 | bodyVel.MaxForce = Vector3.new(0,0,0) | |
| 668 | bodyVel.Velocity = mp.CFrame.upVector * tspeed | |
| 669 | bodyGyro.MaxTorque = Vector3.new(0,0,0) | |
| 670 | bodyGyro.CFrame = workspace.CurrentCamera.CFrame * CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0)) | |
| 671 | hum.PlatformStand = false | |
| 672 | if hum:GetState() == Enum.HumanoidStateType.FallingDown then | |
| 673 | hum:ChangeState(Enum.HumanoidStateType.GettingUp) | |
| 674 | end | |
| 675 | pe.Enabled = false | |
| 676 | pe2.Enabled = false | |
| 677 | pe3.Enabled = false | |
| 678 | pe4.Enabled = false | |
| 679 | pe5.Enabled = false | |
| 680 | pe6.Enabled = false | |
| 681 | sEnable = false | |
| 682 | fsound:Stop() | |
| 683 | end | |
| 684 | end) |