Advertisement
wamandnj

Untitled

Feb 28th, 2019
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. sEnable = false
  447. colNum = 1
  448. 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)}
  449.  
  450. sfg = Instance.new("SurfaceGui",mp)
  451. sfg.Face = Enum.NormalId.Back
  452. frm = Instance.new("Frame",sfg)
  453. frm.Size = UDim2.new(0.1,0,1,0)
  454. frm.BorderSizePixel = 0
  455. frm2 = Instance.new("Frame",sfg)
  456. frm2.Size = UDim2.new(0.1,0,1,0)
  457. frm2.Position = UDim2.new(0.1,0,0,0)
  458. frm2.BorderSizePixel = 0
  459. frm2.BackgroundColor3 = Color3.new(0,0,0)
  460. frm3 = Instance.new("Frame",frm2)
  461. frm3.Size = UDim2.new(1,0,-1,0)
  462. frm3.Position = UDim2.new(0,0,1,0)
  463. frm3.BorderSizePixel = 0
  464. frm3.BackgroundColor3 = Color3.new(1,1,1)
  465.  
  466. for i,v in pairs(mod:GetChildren()) do
  467. if v:IsA("BasePart") then
  468. v.TopSurface = "SmoothNoOutlines"
  469. v.BottomSurface = "SmoothNoOutlines"
  470. v.FrontSurface = "SmoothNoOutlines"
  471. v.RightSurface = "SmoothNoOutlines"
  472. v.BackSurface = "SmoothNoOutlines"
  473. v.LeftSurface = "SmoothNoOutlines"
  474. if v ~= mp then
  475. local w = Instance.new("Weld")
  476. w.Part0 = mp
  477. w.Part1 = v
  478. w.C0 = v.CFrame:inverse() * mp.CFrame
  479. w.Parent = mp
  480. end
  481. end
  482. end
  483.  
  484. hum = char:FindFirstChildOfClass("Humanoid")
  485.  
  486. local w = Instance.new("Weld")
  487. w.Part0 = mp
  488. w.Part1 = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
  489. w.C0 = CFrame.new(0,0,-0.75) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
  490. w.Parent = mp
  491.  
  492. bodyVel = Instance.new("BodyVelocity",char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso"))
  493. bodyVel.MaxForce = Vector3.new(0,0,0)
  494. bodyVel.Velocity = mp.CFrame.upVector * 10
  495.  
  496. bodyGyro = Instance.new("BodyGyro",char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso"))
  497. bodyGyro.MaxTorque = Vector3.new(0,0,0)
  498. bodyGyro.CFrame = workspace.CurrentCamera.CFrame * CFrame.Angles(math.rad(0),math.rad(0),math.rad(90))
  499.  
  500. msc = Instance.new("Sound",mp)
  501. msc.Volume = 10
  502. msc.PlaybackSpeed = 1
  503. msc.Pitch = 1
  504. msc.SoundId = "rbxassetid://805952765" --133843808
  505. msc.Name = "nib"
  506. msc.Looped = true
  507.  
  508.  
  509. fsound = Instance.new("Sound",mp)
  510. fsound.SoundId = "rbxassetid://183339994"
  511. fsound.Pitch = 1.5
  512. fsound.Looped = true
  513. fsound.Volume = 1
  514. end
  515. generateModel()
  516.  
  517. plr.CharacterAdded:connect(function()
  518. wait()
  519. generateModel()
  520. end)
  521.  
  522. local isJump = false
  523. local isSpace = false
  524. local speed = 30
  525. local maxspeed = 60
  526. local minspeed = 20
  527. local rd = false
  528. local fd = false
  529. local gd = false
  530.  
  531. uis.InputBegan:connect(function(key,processed)
  532. if not processed then
  533. if key.KeyCode == Enum.KeyCode.Space then
  534. if isJump == true then
  535. isSpace = true
  536. end
  537. end
  538. if key.KeyCode == Enum.KeyCode.Q then
  539. if sEnable == true then
  540. sEnable = false
  541. else
  542. sEnable = true
  543. end
  544. end
  545. if key.KeyCode == Enum.KeyCode.E then
  546. colNum = colNum + 1
  547. if colNum > #colList + 1 then
  548. colNum = 1
  549. end
  550. end
  551. if key.KeyCode == Enum.KeyCode.R then
  552. rd = true
  553. end
  554. if key.KeyCode == Enum.KeyCode.F then
  555. fd = true
  556. end
  557. if key.KeyCode == Enum.KeyCode.T and isSpace == true then
  558. msc:Play()
  559. fsound.Volume = 5
  560. tr.Enabled = true
  561. gd = true
  562. end
  563. end
  564. end)
  565. uis.InputEnded:connect(function(key,processed)
  566. if not processed then
  567. if key.KeyCode == Enum.KeyCode.Space then
  568. isSpace = false
  569. end
  570. if key.KeyCode == Enum.KeyCode.R then
  571. rd = false
  572. end
  573. if key.KeyCode == Enum.KeyCode.F then
  574. fd = false
  575. end
  576. if key.KeyCode == Enum.KeyCode.T then
  577. msc:Stop()
  578. fsound.Volume = 1
  579. tr.Enabled = false
  580. gd = false
  581. end
  582. end
  583. end)
  584.  
  585.  
  586. local r,g,b = 255,0,0
  587.  
  588. coroutine.resume(coroutine.create(function()
  589. while wait() do
  590. for i=0,255,10 do wait() g = i end
  591. for i=255,0,-10 do wait() r = i end
  592. for i=0,255,10 do wait() b = i end
  593. for i=255,0,-10 do wait() g = i end
  594. for i=0,255,10 do wait() r = i end
  595. for i=255,0,-10 do wait() b = i end
  596. end
  597. end))
  598.  
  599.  
  600. game:service("RunService").RenderStepped:connect(function()
  601. if rd == true and fd == false then speed = speed + 0.2 end
  602. if rd == false and fd == true then speed = speed - 0.2 end
  603. if speed < minspeed then speed = minspeed end
  604. if speed > maxspeed then speed = maxspeed end
  605. local tspeed = speed
  606. frm3.BackgroundColor3 = Color3.new(1,1,1)
  607. if gd == true then tspeed = 240 frm3.BackgroundColor3 = Color3.new(1,1,0) end
  608. frm3.Size = UDim2.new(1,0,-((speed-minspeed)/(maxspeed-minspeed)),0)
  609. if colNum <= #colList then
  610. frm.BackgroundColor3 = colList[colNum]
  611. pe5.Color = ColorSequence.new(colList[colNum])
  612. pe6.Color = ColorSequence.new(colList[colNum])
  613. else
  614. frm.BackgroundColor3 = Color3.fromRGB(r,g,b)
  615. pe5.Color = ColorSequence.new(Color3.fromRGB(r,g,b))
  616. pe6.Color = ColorSequence.new(Color3.fromRGB(r,g,b))
  617. end
  618.  
  619. fsound.Pitch = 1 + speed/50
  620.  
  621. local ray = Ray.new(char:FindFirstChild("HumanoidRootPart").CFrame.p,Vector3.new(0,-4,0))
  622. local par,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,char:GetChildren(),false,true)
  623. if not par then isJump = true else isJump = false end
  624. if isSpace == true then
  625. if isJump == true then
  626. if fsound.IsPlaying == false then
  627. fsound:Play()
  628. end
  629. hum.JumpPower = 350
  630. hum.Jump = true
  631. bodyVel.MaxForce = Vector3.new(10000,10000,10000)
  632. bodyVel.Velocity = mp.CFrame.upVector * tspeed
  633. bodyGyro.MaxTorque = Vector3.new(3000,3000,3000)
  634. bodyGyro.CFrame = workspace.CurrentCamera.CFrame * CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0))
  635. hum.PlatformStand = true
  636. pe.Enabled = true
  637. pe2.Enabled = true
  638. pe3.Enabled = true
  639. pe4.Enabled = true
  640. if sEnable == true then
  641. pe5.Enabled = true
  642. pe6.Enabled = true
  643. else
  644. pe5.Enabled = false
  645. pe6.Enabled = false
  646. end
  647. else
  648. bodyVel.MaxForce = Vector3.new(0,0,0)
  649. bodyVel.Velocity = mp.CFrame.upVector * tspeed
  650. bodyGyro.MaxTorque = Vector3.new(0,0,0)
  651. bodyGyro.CFrame = workspace.CurrentCamera.CFrame * CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0))
  652. hum.PlatformStand = true
  653. if hum:GetState() == Enum.HumanoidStateType.FallingDown then
  654. hum:ChangeState(Enum.HumanoidStateType.GettingUp)
  655. end
  656. pe.Enabled = false
  657. pe2.Enabled = false
  658. pe3.Enabled = false
  659. pe4.Enabled = false
  660. pe5.Enabled = false
  661. pe6.Enabled = false
  662. sEnable = false
  663. fsound:Stop()
  664. end
  665. else
  666. bodyVel.MaxForce = Vector3.new(0,0,0)
  667. bodyVel.Velocity = mp.CFrame.upVector * tspeed
  668. bodyGyro.MaxTorque = Vector3.new(0,0,0)
  669. bodyGyro.CFrame = workspace.CurrentCamera.CFrame * CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0))
  670. hum.PlatformStand = false
  671. if hum:GetState() == Enum.HumanoidStateType.FallingDown then
  672. hum:ChangeState(Enum.HumanoidStateType.GettingUp)
  673. end
  674. pe.Enabled = false
  675. pe2.Enabled = false
  676. pe3.Enabled = false
  677. pe4.Enabled = false
  678. pe5.Enabled = false
  679. pe6.Enabled = false
  680. sEnable = false
  681. fsound:Stop()
  682. end
  683. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement