Inoob8C

road to grampys hoise

Mar 23rd, 2022
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.22 KB | None | 0 0
  1. -- Made by sokkathedumbkid/hampter#2656
  2. local ScreenGui = Instance.new("ScreenGui")
  3. local main = Instance.new("Frame")
  4. local Title = Instance.new("TextLabel")
  5. local InfiniteHealth = Instance.new("TextButton")
  6. local BringItems = Instance.new("TextButton")
  7. local JumpBoost = Instance.new("TextButton")
  8. local Spectate = Instance.new("TextButton")
  9. local Levitate = Instance.new("TextButton")
  10. local Fly = Instance.new("TextButton")
  11.  
  12. --Properties:
  13.  
  14. ScreenGui.Parent = game.CoreGui
  15. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  16.  
  17. main.Name = "main"
  18. main.Parent = ScreenGui
  19. main.AnchorPoint = Vector2.new(0.5, 0.5)
  20. main.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  21. main.BorderColor3 = Color3.fromRGB(255, 255, 255)
  22. main.BorderSizePixel = 10
  23. main.Position = UDim2.new(0.508748055, 0, 0.518404901, 0)
  24. main.Size = UDim2.new(0.265837312, 0, 0.363190174, 0)
  25. main.ZIndex = 4
  26. main.Style = Enum.FrameStyle.RobloxRound
  27. main. Active = true
  28. main. Draggable = true
  29.  
  30. Title.Name = "Title"
  31. Title.Parent = main
  32. Title.BackgroundColor3 = Color3.fromRGB(109, 109, 109)
  33. Title.BackgroundTransparency = 0.900
  34. Title.BorderColor3 = Color3.fromRGB(255, 255, 255)
  35. Title.BorderSizePixel = 0
  36. Title.Position = UDim2.new(0.0254914574, 0, 0.0559515432, 0)
  37. Title.Size = UDim2.new(0, 465, 0, 50)
  38. Title.Font = Enum.Font.GothamBlack
  39. Title.Text = "Road To Grambys House GUI V1"
  40. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  41. Title.TextSize = 31.000
  42. Title.TextStrokeTransparency = 0.000
  43.  
  44. InfiniteHealth.Name = "Infinite Health"
  45. InfiniteHealth.Parent = main
  46. InfiniteHealth.BackgroundColor3 = Color3.fromRGB(109, 109, 109)
  47. InfiniteHealth.BackgroundTransparency = 0.900
  48. InfiniteHealth.BorderSizePixel = 0
  49. InfiniteHealth.Position = UDim2.new(0.0406134799, 0, 0.276729554, 0)
  50. InfiniteHealth.Size = UDim2.new(0, 200, 0, 50)
  51. InfiniteHealth.Font = Enum.Font.GothamBlack
  52. InfiniteHealth.Text = "Infinite Health (Spam Click This)"
  53. InfiniteHealth.TextColor3 = Color3.fromRGB(255, 255, 255)
  54. InfiniteHealth.TextScaled = true
  55. InfiniteHealth.TextSize = 12.000
  56. InfiniteHealth.TextStrokeTransparency = 0.000
  57. InfiniteHealth.TextWrapped = true
  58. InfiniteHealth.MouseButton1Down:connect(function()
  59. for i = 1,15 do
  60. game:GetService("ReplicatedStorage").Networking.NetworkingEvent:FireServer("UseItem",false,true,workspace.Tooth)
  61. end
  62. end)
  63.  
  64. BringItems.Name = "Bring Items"
  65. BringItems.Parent = main
  66. BringItems.BackgroundColor3 = Color3.fromRGB(109, 109, 109)
  67. BringItems.BackgroundTransparency = 0.900
  68. BringItems.BorderSizePixel = 0
  69. BringItems.Position = UDim2.new(0.0398058593, 0, 0.770248592, 0)
  70. BringItems.Size = UDim2.new(0, 205, 0, 50)
  71. BringItems.Font = Enum.Font.GothamBlack
  72. BringItems.Text = "Bring All Items To You (May Cause Lag)"
  73. BringItems.TextColor3 = Color3.fromRGB(255, 255, 255)
  74. BringItems.TextScaled = true
  75. BringItems.TextSize = 12.000
  76. BringItems.TextStrokeTransparency = 0.000
  77. BringItems.TextWrapped = true
  78. BringItems.MouseButton1Down:connect(function()
  79. for i,v in pairs(game:GetService("Workspace").WorldObjects:GetDescendants()) do
  80. if v.ClassName == "MeshPart" then
  81. local b = v
  82. game:GetService("ReplicatedStorage").Networking.NetworkingEvent:FireServer("PickupItem", b, true, CFrame.new(Vector3.new(0,0,0), Vector3.new(0,0,0)), 3, Vector3.new(0,0,0))
  83. wait(0.1)
  84. end
  85. end
  86. end)
  87.  
  88. JumpBoost.Name = "Jump Boost"
  89. JumpBoost.Parent = main
  90. JumpBoost.BackgroundColor3 = Color3.fromRGB(109, 109, 109)
  91. JumpBoost.BackgroundTransparency = 0.900
  92. JumpBoost.BorderSizePixel = 0
  93. JumpBoost.Position = UDim2.new(0.571874619, 0, 0.770248592, 0)
  94. JumpBoost.Size = UDim2.new(0, 205, 0, 50)
  95. JumpBoost.Font = Enum.Font.GothamBlack
  96. JumpBoost.Text = "Jump Boost/No Gravity"
  97. JumpBoost.TextColor3 = Color3.fromRGB(255, 255, 255)
  98. JumpBoost.TextScaled = true
  99. JumpBoost.TextSize = 12.000
  100. JumpBoost.TextStrokeTransparency = 0.000
  101. JumpBoost.TextWrapped = true
  102. JumpBoost.MouseButton1Down:connect(function()
  103. game.Workspace.Gravity = 5
  104. end)
  105.  
  106. Spectate.Name = "Spectate"
  107. Spectate.Parent = main
  108. Spectate.BackgroundColor3 = Color3.fromRGB(109, 109, 109)
  109. Spectate.BackgroundTransparency = 0.900
  110. Spectate.BorderSizePixel = 0
  111. Spectate.Position = UDim2.new(0.0398058146, 0, 0.515608788, 0)
  112. Spectate.Size = UDim2.new(0, 205, 0, 50)
  113. Spectate.Font = Enum.Font.GothamBlack
  114. Spectate.Text = "Spectate/Freecam (Shift + P)"
  115. Spectate.TextColor3 = Color3.fromRGB(255, 255, 255)
  116. Spectate.TextScaled = true
  117. Spectate.TextSize = 12.000
  118. Spectate.TextStrokeTransparency = 0.000
  119. Spectate.TextWrapped = true
  120. Spectate.MouseButton1Down:connect(function()
  121. function sandbox(var,func)
  122. local env = getfenv(func)
  123. local newenv = setmetatable({},{
  124. __index = function(self,k)
  125. if k=="script" then
  126. return var
  127. else
  128. return env[k]
  129. end
  130. end,
  131. })
  132. setfenv(func,newenv)
  133. return func
  134. end
  135. cors = {}
  136. mas = Instance.new("Model",game:GetService("Lighting"))
  137. LocalScript0 = Instance.new("LocalScript")
  138. LocalScript0.Name = "FreeCamera"
  139. LocalScript0.Parent = mas
  140. table.insert(cors,sandbox(LocalScript0,function()
  141. -----------------------------------------------------------------------
  142. -- Freecam
  143. -- Cinematic free camera for spectating and video production.
  144. ------------------------------------------------------------------------
  145.  
  146. local pi = math.pi
  147. local abs = math.abs
  148. local clamp = math.clamp
  149. local exp = math.exp
  150. local rad = math.rad
  151. local sign = math.sign
  152. local sqrt = math.sqrt
  153. local tan = math.tan
  154.  
  155. local ContextActionService = game:GetService("ContextActionService")
  156. local Players = game:GetService("Players")
  157. local RunService = game:GetService("RunService")
  158. local StarterGui = game:GetService("StarterGui")
  159. local UserInputService = game:GetService("UserInputService")
  160.  
  161. local LocalPlayer = Players.LocalPlayer
  162. if not LocalPlayer then
  163. Players:GetPropertyChangedSignal("LocalPlayer"):Wait()
  164. LocalPlayer = Players.LocalPlayer
  165. end
  166.  
  167. local Camera = workspace.CurrentCamera
  168. workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function()
  169. local newCamera = workspace.CurrentCamera
  170. if newCamera then
  171. Camera = newCamera
  172. end
  173. end)
  174.  
  175. ------------------------------------------------------------------------
  176.  
  177. local TOGGLE_INPUT_PRIORITY = Enum.ContextActionPriority.Low.Value
  178. local INPUT_PRIORITY = Enum.ContextActionPriority.High.Value
  179. local FREECAM_MACRO_KB = {Enum.KeyCode.LeftShift, Enum.KeyCode.P}
  180.  
  181. local NAV_GAIN = Vector3.new(1, 1, 1)*64
  182. local PAN_GAIN = Vector2.new(0.75, 1)*8
  183. local FOV_GAIN = 300
  184.  
  185. local PITCH_LIMIT = rad(90)
  186.  
  187. local VEL_STIFFNESS = 1.5
  188. local PAN_STIFFNESS = 1.0
  189. local FOV_STIFFNESS = 4.0
  190.  
  191. ------------------------------------------------------------------------
  192.  
  193. local Spring = {} do
  194. Spring.__index = Spring
  195.  
  196. function Spring.new(freq, pos)
  197. local self = setmetatable({}, Spring)
  198. self.f = freq
  199. self.p = pos
  200. self.v = pos*0
  201. return self
  202. end
  203.  
  204. function Spring:Update(dt, goal)
  205. local f = self.f*2*pi
  206. local p0 = self.p
  207. local v0 = self.v
  208.  
  209. local offset = goal - p0
  210. local decay = exp(-f*dt)
  211.  
  212. local p1 = goal + (v0*dt - offset*(f*dt + 1))*decay
  213. local v1 = (f*dt*(offset*f - v0) + v0)*decay
  214.  
  215. self.p = p1
  216. self.v = v1
  217.  
  218. return p1
  219. end
  220.  
  221. function Spring:Reset(pos)
  222. self.p = pos
  223. self.v = pos*0
  224. end
  225. end
  226.  
  227. ------------------------------------------------------------------------
  228.  
  229. local cameraPos = Vector3.new()
  230. local cameraRot = Vector2.new()
  231. local cameraFov = 0
  232.  
  233. local velSpring = Spring.new(VEL_STIFFNESS, Vector3.new())
  234. local panSpring = Spring.new(PAN_STIFFNESS, Vector2.new())
  235. local fovSpring = Spring.new(FOV_STIFFNESS, 0)
  236.  
  237. ------------------------------------------------------------------------
  238.  
  239. local Input = {} do
  240. local thumbstickCurve do
  241. local K_CURVATURE = 2.0
  242. local K_DEADZONE = 0.15
  243.  
  244. local function fCurve(x)
  245. return (exp(K_CURVATURE*x) - 1)/(exp(K_CURVATURE) - 1)
  246. end
  247.  
  248. local function fDeadzone(x)
  249. return fCurve((x - K_DEADZONE)/(1 - K_DEADZONE))
  250. end
  251.  
  252. function thumbstickCurve(x)
  253. return sign(x)*clamp(fDeadzone(abs(x)), 0, 1)
  254. end
  255. end
  256.  
  257. local gamepad = {
  258. ButtonX = 0,
  259. ButtonY = 0,
  260. DPadDown = 0,
  261. DPadUp = 0,
  262. ButtonL2 = 0,
  263. ButtonR2 = 0,
  264. Thumbstick1 = Vector2.new(),
  265. Thumbstick2 = Vector2.new(),
  266. }
  267.  
  268. local keyboard = {
  269. W = 0,
  270. A = 0,
  271. S = 0,
  272. D = 0,
  273. E = 0,
  274. Q = 0,
  275. U = 0,
  276. H = 0,
  277. J = 0,
  278. K = 0,
  279. I = 0,
  280. Y = 0,
  281. Up = 0,
  282. Down = 0,
  283. LeftShift = 0,
  284. RightShift = 0,
  285. }
  286.  
  287. local mouse = {
  288. Delta = Vector2.new(),
  289. MouseWheel = 0,
  290. }
  291.  
  292. local NAV_GAMEPAD_SPEED = Vector3.new(1, 1, 1)
  293. local NAV_KEYBOARD_SPEED = Vector3.new(1, 1, 1)
  294. local PAN_MOUSE_SPEED = Vector2.new(1, 1)*(pi/64)
  295. local PAN_GAMEPAD_SPEED = Vector2.new(1, 1)*(pi/8)
  296. local FOV_WHEEL_SPEED = 1.0
  297. local FOV_GAMEPAD_SPEED = 0.25
  298. local NAV_ADJ_SPEED = 0.75
  299. local NAV_SHIFT_MUL = 0.25
  300.  
  301. local navSpeed = 1
  302.  
  303. function Input.Vel(dt)
  304. navSpeed = clamp(navSpeed + dt*(keyboard.Up - keyboard.Down)*NAV_ADJ_SPEED, 0.01, 4)
  305.  
  306. local kGamepad = Vector3.new(
  307. thumbstickCurve(gamepad.Thumbstick1.x),
  308. thumbstickCurve(gamepad.ButtonR2) - thumbstickCurve(gamepad.ButtonL2),
  309. thumbstickCurve(-gamepad.Thumbstick1.y)
  310. )*NAV_GAMEPAD_SPEED
  311.  
  312. local kKeyboard = Vector3.new(
  313. keyboard.D - keyboard.A + keyboard.K - keyboard.H,
  314. keyboard.E - keyboard.Q + keyboard.I - keyboard.Y,
  315. keyboard.S - keyboard.W + keyboard.J - keyboard.U
  316. )*NAV_KEYBOARD_SPEED
  317.  
  318. local shift = UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) or UserInputService:IsKeyDown(Enum.KeyCode.RightShift)
  319.  
  320. return (kGamepad + kKeyboard)*(navSpeed*(shift and NAV_SHIFT_MUL or 1))
  321. end
  322.  
  323. function Input.Pan(dt)
  324. local kGamepad = Vector2.new(
  325. thumbstickCurve(gamepad.Thumbstick2.y),
  326. thumbstickCurve(-gamepad.Thumbstick2.x)
  327. )*PAN_GAMEPAD_SPEED
  328. local kMouse = mouse.Delta*PAN_MOUSE_SPEED
  329. mouse.Delta = Vector2.new()
  330. return kGamepad + kMouse
  331. end
  332.  
  333. function Input.Fov(dt)
  334. local kGamepad = (gamepad.ButtonX - gamepad.ButtonY)*FOV_GAMEPAD_SPEED
  335. local kMouse = mouse.MouseWheel*FOV_WHEEL_SPEED
  336. mouse.MouseWheel = 0
  337. return kGamepad + kMouse
  338. end
  339.  
  340. do
  341. local function Keypress(action, state, input)
  342. keyboard[input.KeyCode.Name] = state == Enum.UserInputState.Begin and 1 or 0
  343. return Enum.ContextActionResult.Sink
  344. end
  345.  
  346. local function GpButton(action, state, input)
  347. gamepad[input.KeyCode.Name] = state == Enum.UserInputState.Begin and 1 or 0
  348. return Enum.ContextActionResult.Sink
  349. end
  350.  
  351. local function MousePan(action, state, input)
  352. local delta = input.Delta
  353. mouse.Delta = Vector2.new(-delta.y, -delta.x)
  354. return Enum.ContextActionResult.Sink
  355. end
  356.  
  357. local function Thumb(action, state, input)
  358. gamepad[input.KeyCode.Name] = input.Position
  359. return Enum.ContextActionResult.Sink
  360. end
  361.  
  362. local function Trigger(action, state, input)
  363. gamepad[input.KeyCode.Name] = input.Position.z
  364. return Enum.ContextActionResult.Sink
  365. end
  366.  
  367. local function MouseWheel(action, state, input)
  368. mouse[input.UserInputType.Name] = -input.Position.z
  369. return Enum.ContextActionResult.Sink
  370. end
  371.  
  372. local function Zero(t)
  373. for k, v in pairs(t) do
  374. t[k] = v*0
  375. end
  376. end
  377.  
  378. function Input.StartCapture()
  379. ContextActionService:BindActionAtPriority("FreecamKeyboard", Keypress, false, INPUT_PRIORITY,
  380. Enum.KeyCode.W, Enum.KeyCode.U,
  381. Enum.KeyCode.A, Enum.KeyCode.H,
  382. Enum.KeyCode.S, Enum.KeyCode.J,
  383. Enum.KeyCode.D, Enum.KeyCode.K,
  384. Enum.KeyCode.E, Enum.KeyCode.I,
  385. Enum.KeyCode.Q, Enum.KeyCode.Y,
  386. Enum.KeyCode.Up, Enum.KeyCode.Down
  387. )
  388. ContextActionService:BindActionAtPriority("FreecamMousePan", MousePan, false, INPUT_PRIORITY, Enum.UserInputType.MouseMovement)
  389. ContextActionService:BindActionAtPriority("FreecamMouseWheel", MouseWheel, false, INPUT_PRIORITY, Enum.UserInputType.MouseWheel)
  390. ContextActionService:BindActionAtPriority("FreecamGamepadButton", GpButton, false, INPUT_PRIORITY, Enum.KeyCode.ButtonX, Enum.KeyCode.ButtonY)
  391. ContextActionService:BindActionAtPriority("FreecamGamepadTrigger", Trigger, false, INPUT_PRIORITY, Enum.KeyCode.ButtonR2, Enum.KeyCode.ButtonL2)
  392. ContextActionService:BindActionAtPriority("FreecamGamepadThumbstick", Thumb, false, INPUT_PRIORITY, Enum.KeyCode.Thumbstick1, Enum.KeyCode.Thumbstick2)
  393. end
  394.  
  395. function Input.StopCapture()
  396. navSpeed = 1
  397. Zero(gamepad)
  398. Zero(keyboard)
  399. Zero(mouse)
  400. ContextActionService:UnbindAction("FreecamKeyboard")
  401. ContextActionService:UnbindAction("FreecamMousePan")
  402. ContextActionService:UnbindAction("FreecamMouseWheel")
  403. ContextActionService:UnbindAction("FreecamGamepadButton")
  404. ContextActionService:UnbindAction("FreecamGamepadTrigger")
  405. ContextActionService:UnbindAction("FreecamGamepadThumbstick")
  406. end
  407. end
  408. end
  409.  
  410. local function GetFocusDistance(cameraFrame)
  411. local znear = 0.1
  412. local viewport = Camera.ViewportSize
  413. local projy = 2*tan(cameraFov/2)
  414. local projx = viewport.x/viewport.y*projy
  415. local fx = cameraFrame.rightVector
  416. local fy = cameraFrame.upVector
  417. local fz = cameraFrame.lookVector
  418.  
  419. local minVect = Vector3.new()
  420. local minDist = 512
  421.  
  422. for x = 0, 1, 0.5 do
  423. for y = 0, 1, 0.5 do
  424. local cx = (x - 0.5)*projx
  425. local cy = (y - 0.5)*projy
  426. local offset = fx*cx - fy*cy + fz
  427. local origin = cameraFrame.p + offset*znear
  428. local part, hit = workspace:FindPartOnRay(Ray.new(origin, offset.unit*minDist))
  429. local dist = (hit - origin).magnitude
  430. if minDist > dist then
  431. minDist = dist
  432. minVect = offset.unit
  433. end
  434. end
  435. end
  436.  
  437. return fz:Dot(minVect)*minDist
  438. end
  439.  
  440. ------------------------------------------------------------------------
  441.  
  442. local function StepFreecam(dt)
  443. local vel = velSpring:Update(dt, Input.Vel(dt))
  444. local pan = panSpring:Update(dt, Input.Pan(dt))
  445. local fov = fovSpring:Update(dt, Input.Fov(dt))
  446.  
  447. local zoomFactor = sqrt(tan(rad(70/2))/tan(rad(cameraFov/2)))
  448.  
  449. cameraFov = clamp(cameraFov + fov*FOV_GAIN*(dt/zoomFactor), 1, 120)
  450. cameraRot = cameraRot + pan*PAN_GAIN*(dt/zoomFactor)
  451. cameraRot = Vector2.new(clamp(cameraRot.x, -PITCH_LIMIT, PITCH_LIMIT), cameraRot.y%(2*pi))
  452.  
  453. local cameraCFrame = CFrame.new(cameraPos)*CFrame.fromOrientation(cameraRot.x, cameraRot.y, 0)*CFrame.new(vel*NAV_GAIN*dt)
  454. cameraPos = cameraCFrame.p
  455.  
  456. Camera.CFrame = cameraCFrame
  457. Camera.Focus = cameraCFrame*CFrame.new(0, 0, -GetFocusDistance(cameraCFrame))
  458. Camera.FieldOfView = cameraFov
  459. end
  460.  
  461. ------------------------------------------------------------------------
  462.  
  463. local PlayerState = {} do
  464. local mouseIconEnabled
  465. local cameraSubject
  466. local cameraType
  467. local cameraFocus
  468. local cameraCFrame
  469. local cameraFieldOfView
  470. local screenGuis = {}
  471. local coreGuis = {
  472. Backpack = true,
  473. Chat = true,
  474. Health = true,
  475. PlayerList = true,
  476. }
  477. local setCores = {
  478. BadgesNotificationsActive = true,
  479. PointsNotificationsActive = true,
  480. }
  481.  
  482. -- Save state and set up for freecam
  483. function PlayerState.Push()
  484. for name in pairs(coreGuis) do
  485. coreGuis[name] = StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType[name])
  486. StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType[name], false)
  487. end
  488. for name in pairs(setCores) do
  489. setCores[name] = StarterGui:GetCore(name)
  490. StarterGui:SetCore(name, false)
  491. end
  492. local playergui = LocalPlayer:FindFirstChildOfClass("PlayerGui")
  493. if playergui then
  494. for _, gui in pairs(playergui:GetChildren()) do
  495. if gui:IsA("ScreenGui") and gui.Enabled then
  496. screenGuis[#screenGuis + 1] = gui
  497. gui.Enabled = false
  498. end
  499. end
  500. end
  501.  
  502. cameraFieldOfView = Camera.FieldOfView
  503. Camera.FieldOfView = 70
  504.  
  505. cameraType = Camera.CameraType
  506. Camera.CameraType = Enum.CameraType.Custom
  507.  
  508. cameraSubject = Camera.CameraSubject
  509. Camera.CameraSubject = nil
  510.  
  511. cameraCFrame = Camera.CFrame
  512. cameraFocus = Camera.Focus
  513.  
  514. mouseIconEnabled = UserInputService.MouseIconEnabled
  515. UserInputService.MouseIconEnabled = false
  516.  
  517. mouseBehavior = UserInputService.MouseBehavior
  518. UserInputService.MouseBehavior = Enum.MouseBehavior.Default
  519. end
  520.  
  521. -- Restore state
  522. function PlayerState.Pop()
  523. for name, isEnabled in pairs(coreGuis) do
  524. StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType[name], isEnabled)
  525. end
  526. for name, isEnabled in pairs(setCores) do
  527. StarterGui:SetCore(name, isEnabled)
  528. end
  529. for _, gui in pairs(screenGuis) do
  530. if gui.Parent then
  531. gui.Enabled = true
  532. end
  533. end
  534.  
  535. Camera.FieldOfView = cameraFieldOfView
  536. cameraFieldOfView = nil
  537.  
  538. Camera.CameraType = cameraType
  539. cameraType = nil
  540.  
  541. Camera.CameraSubject = cameraSubject
  542. cameraSubject = nil
  543.  
  544. Camera.CFrame = cameraCFrame
  545. cameraCFrame = nil
  546.  
  547. Camera.Focus = cameraFocus
  548. cameraFocus = nil
  549.  
  550. UserInputService.MouseIconEnabled = mouseIconEnabled
  551. mouseIconEnabled = nil
  552.  
  553. UserInputService.MouseBehavior = mouseBehavior
  554. mouseBehavior = nil
  555. end
  556. end
  557.  
  558. local function StartFreecam()
  559. local cameraCFrame = Camera.CFrame
  560. cameraRot = Vector2.new(cameraCFrame:toEulerAnglesYXZ())
  561. cameraPos = cameraCFrame.p
  562. cameraFov = Camera.FieldOfView
  563.  
  564. velSpring:Reset(Vector3.new())
  565. panSpring:Reset(Vector2.new())
  566. fovSpring:Reset(0)
  567.  
  568. PlayerState.Push()
  569. RunService:BindToRenderStep("Freecam", Enum.RenderPriority.Camera.Value, StepFreecam)
  570. Input.StartCapture()
  571. end
  572.  
  573. local function StopFreecam()
  574. Input.StopCapture()
  575. RunService:UnbindFromRenderStep("Freecam")
  576. PlayerState.Pop()
  577. end
  578.  
  579. ------------------------------------------------------------------------
  580.  
  581. do
  582. local enabled = false
  583.  
  584. local function ToggleFreecam()
  585. if enabled then
  586. StopFreecam()
  587. else
  588. StartFreecam()
  589. end
  590. enabled = not enabled
  591. end
  592.  
  593. local function CheckMacro(macro)
  594. for i = 1, #macro - 1 do
  595. if not UserInputService:IsKeyDown(macro[i]) then
  596. return
  597. end
  598. end
  599. ToggleFreecam()
  600. end
  601.  
  602. local function HandleActivationInput(action, state, input)
  603. if state == Enum.UserInputState.Begin then
  604. if input.KeyCode == FREECAM_MACRO_KB[#FREECAM_MACRO_KB] then
  605. CheckMacro(FREECAM_MACRO_KB)
  606. end
  607. end
  608. return Enum.ContextActionResult.Pass
  609. end
  610.  
  611. ContextActionService:BindActionAtPriority("FreecamToggle", HandleActivationInput, false, TOGGLE_INPUT_PRIORITY, FREECAM_MACRO_KB[#FREECAM_MACRO_KB])
  612. end
  613. end))
  614. for i,v in pairs(mas:GetChildren()) do
  615. v.Parent = game:GetService("Players").LocalPlayer.PlayerGui
  616. pcall(function() v:MakeJoints() end)
  617. end
  618. mas:Destroy()
  619. for i,v in pairs(cors) do
  620. spawn(function()
  621. pcall(v)
  622. end)
  623. end
  624.  
  625. end)
  626.  
  627. Levitate.Name = "Levitate"
  628. Levitate.Parent = main
  629. Levitate.BackgroundColor3 = Color3.fromRGB(109, 109, 109)
  630. Levitate.BackgroundTransparency = 0.900
  631. Levitate.BorderSizePixel = 0
  632. Levitate.Position = UDim2.new(0.575010598, 0, 0.276729554, 0)
  633. Levitate.Size = UDim2.new(0, 200, 0, 50)
  634. Levitate.Font = Enum.Font.GothamBlack
  635. Levitate.Text = "Levitate (Jump)"
  636. Levitate.TextColor3 = Color3.fromRGB(255, 255, 255)
  637. Levitate.TextScaled = true
  638. Levitate.TextSize = 12.000
  639. Levitate.TextStrokeTransparency = 0.000
  640. Levitate.TextWrapped = true
  641. Levitate.MouseButton1Down:connect(function()
  642. game.Workspace.Gravity = 100
  643. end)
  644.  
  645. Fly.Name = "Fly"
  646. Fly.Parent = main
  647. Fly.BackgroundColor3 = Color3.fromRGB(109, 109, 109)
  648. Fly.BackgroundTransparency = 0.900
  649. Fly.BorderSizePixel = 0
  650. Fly.Position = UDim2.new(0.575085938, 0, 0.515723288, 0)
  651. Fly.Size = UDim2.new(0, 200, 0, 50)
  652. Fly.Font = Enum.Font.GothamBlack
  653. Fly.Text = "Enable Fly Mode (Press C)"
  654. Fly.TextColor3 = Color3.fromRGB(255, 255, 255)
  655. Fly.TextScaled = true
  656. Fly.TextSize = 12.000
  657. Fly.TextStrokeTransparency = 0.000
  658. Fly.TextWrapped = true
  659. Fly.MouseButton1Down:connect(function()
  660. Instance.new("Folder", game:GetService("ReplicatedStorage")).Name = "IsVIPServer"
  661. end)
Add Comment
Please, Sign In to add comment