Advertisement
Eliquimzzz

Untitled

Apr 24th, 2022
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.03 KB | None | 0 0
  1. local players = game:GetService("Players")
  2. local lplayer = players.LocalPlayer
  3. local teams = game:GetService("Teams")
  4. local COREGUI = game:GetService("CoreGui")
  5. local lhead = lplayer.Character:FindFirstChild("Head")
  6. local lhum = lplayer.Character:FindFirstChildWhichIsA("Humanoid")
  7. local lhump = lplayer.Character:FindFirstChild("HumanoidRootPart")
  8. local rservice = game:GetService("RunService")
  9. local wspace = game:GetService("Workspace")
  10. local workgrag = workspace.Gravity
  11. local Ccam = workspace.CurrentCamera
  12. local Sectors = loadstring(game:HttpGet("https://raw.githubusercontent.com/Hosvile/The-telligence/main/MCButton002"))() -- This does the funny lil notification thingy lol
  13. local Sect = Sectors:CreateButton()
  14. local Cbool = true
  15. local Service = game:GetService("RunService")
  16. local hb = Service.Heartbeat
  17.  
  18. Players = game:GetService("Players")
  19.  
  20. local speaker = Players.LocalPlayer
  21.  
  22. function getRoot(char)
  23. local rootPart = char:FindFirstChild('HumanoidRootPart') or char:FindFirstChild('Torso') or char:FindFirstChild('UpperTorso')
  24. return rootPart
  25. end
  26.  
  27. IYMouse = Players.LocalPlayer:GetMouse()
  28. UserInputService = game:GetService("UserInputService")
  29.  
  30. for i, v in pairs(game:GetDescendants()) do
  31. if v.Name == "Kyia_" then
  32. v:Destroy()
  33. end
  34. end
  35.  
  36. local Model = Instance.new("Model")
  37. Model.Name = "Kyia_"
  38. Model.Parent = wspace
  39.  
  40. local Camera = Instance.new("Part")
  41. Camera.Transparency = 0.75
  42. Camera.Size = Vector3.new(1,1,1)
  43. Camera.Parent = Model
  44. Camera.CFrame = Ccam.CFrame
  45. Camera.Anchored = true
  46. Camera.Shape = "Ball"
  47. Camera.TopSurface = "SmoothNoOutlines"
  48. Camera.CanCollide = false
  49.  
  50. Ccam.CameraSubject = lplayer.Character:FindFirstChild("Head")
  51.  
  52. function sFLY(vfly)
  53. repeat wait() until Players.LocalPlayer and Players.LocalPlayer.Character and getRoot(Players.LocalPlayer.Character) and Players.LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
  54. repeat wait() until IYMouse
  55. if flyKeyDown or flyKeyUp then flyKeyDown:Disconnect() flyKeyUp:Disconnect() end
  56.  
  57. local T = getRoot(Players.LocalPlayer.Character)
  58. local CONTROL = {F = 0, B = 0, L = 0, R = 0, Q = 0, E = 0}
  59. local lCONTROL = {F = 0, B = 0, L = 0, R = 0, Q = 0, E = 0}
  60. local SPEED = 0
  61.  
  62. local function FLY()
  63. FLYING = true
  64. local BG = Instance.new('BodyGyro')
  65. local BV = Instance.new('BodyVelocity')
  66. BG.P = 9e4
  67. BG.Parent = T
  68. BV.Parent = T
  69. BG.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  70. BG.cframe = T.CFrame
  71. BV.velocity = Vector3.new(0, 0, 0)
  72. BV.maxForce = Vector3.new(9e9, 9e9, 9e9)
  73. task.spawn(function()
  74. repeat wait()
  75. if not vfly and Players.LocalPlayer.Character:FindFirstChildOfClass('Humanoid') then
  76. Players.LocalPlayer.Character:FindFirstChildOfClass('Humanoid').PlatformStand = true
  77. end
  78. if CONTROL.L + CONTROL.R ~= 0 or CONTROL.F + CONTROL.B ~= 0 or CONTROL.Q + CONTROL.E ~= 0 then
  79. SPEED = 50
  80. elseif not (CONTROL.L + CONTROL.R ~= 0 or CONTROL.F + CONTROL.B ~= 0 or CONTROL.Q + CONTROL.E ~= 0) and SPEED ~= 0 then
  81. SPEED = 0
  82. end
  83. if (CONTROL.L + CONTROL.R) ~= 0 or (CONTROL.F + CONTROL.B) ~= 0 or (CONTROL.Q + CONTROL.E) ~= 0 then
  84. BV.velocity = ((workspace.CurrentCamera.CoordinateFrame.lookVector * (CONTROL.F + CONTROL.B)) + ((workspace.CurrentCamera.CoordinateFrame * CFrame.new(CONTROL.L + CONTROL.R, (CONTROL.F + CONTROL.B + CONTROL.Q + CONTROL.E) * 0.2, 0).p) - workspace.CurrentCamera.CoordinateFrame.p)) * SPEED
  85. lCONTROL = {F = CONTROL.F, B = CONTROL.B, L = CONTROL.L, R = CONTROL.R}
  86. elseif (CONTROL.L + CONTROL.R) == 0 and (CONTROL.F + CONTROL.B) == 0 and (CONTROL.Q + CONTROL.E) == 0 and SPEED ~= 0 then
  87. BV.velocity = ((workspace.CurrentCamera.CoordinateFrame.lookVector * (lCONTROL.F + lCONTROL.B)) + ((workspace.CurrentCamera.CoordinateFrame * CFrame.new(lCONTROL.L + lCONTROL.R, (lCONTROL.F + lCONTROL.B + CONTROL.Q + CONTROL.E) * 0.2, 0).p) - workspace.CurrentCamera.CoordinateFrame.p)) * SPEED
  88. else
  89. BV.velocity = Vector3.new(0, 0, 0)
  90. end
  91. BG.cframe = workspace.CurrentCamera.CoordinateFrame
  92. until not FLYING
  93. CONTROL = {F = 0, B = 0, L = 0, R = 0, Q = 0, E = 0}
  94. lCONTROL = {F = 0, B = 0, L = 0, R = 0, Q = 0, E = 0}
  95. SPEED = 0
  96. BG:Destroy()
  97. BV:Destroy()
  98. if Players.LocalPlayer.Character:FindFirstChildOfClass('Humanoid') then
  99. Players.LocalPlayer.Character:FindFirstChildOfClass('Humanoid').PlatformStand = false
  100. end
  101. end)
  102. end
  103. flyKeyDown = IYMouse.KeyDown:Connect(function(KEY)
  104. if KEY:lower() == 'w' then
  105. CONTROL.F = (vfly and vehicleflyspeed or iyflyspeed)
  106. elseif KEY:lower() == 's' then
  107. CONTROL.B = - (vfly and vehicleflyspeed or iyflyspeed)
  108. elseif KEY:lower() == 'a' then
  109. CONTROL.L = - (vfly and vehicleflyspeed or iyflyspeed)
  110. elseif KEY:lower() == 'd' then
  111. CONTROL.R = (vfly and vehicleflyspeed or iyflyspeed)
  112. elseif QEfly and KEY:lower() == 'e' then
  113. CONTROL.Q = (vfly and vehicleflyspeed or iyflyspeed)*2
  114. elseif QEfly and KEY:lower() == 'q' then
  115. CONTROL.E = -(vfly and vehicleflyspeed or iyflyspeed)*2
  116. end
  117. pcall(function() workspace.CurrentCamera.CameraType = Enum.CameraType.Track end)
  118. end)
  119. flyKeyUp = IYMouse.KeyUp:Connect(function(KEY)
  120. if KEY:lower() == 'w' then
  121. CONTROL.F = 0
  122. elseif KEY:lower() == 's' then
  123. CONTROL.B = 0
  124. elseif KEY:lower() == 'a' then
  125. CONTROL.L = 0
  126. elseif KEY:lower() == 'd' then
  127. CONTROL.R = 0
  128. elseif KEY:lower() == 'e' then
  129. CONTROL.Q = 0
  130. elseif KEY:lower() == 'q' then
  131. CONTROL.E = 0
  132. end
  133. end)
  134. FLY()
  135. end
  136.  
  137. function NOFLY()
  138. FLYING = false
  139. if flyKeyDown or flyKeyUp then flyKeyDown:Disconnect() flyKeyUp:Disconnect() end
  140. if Players.LocalPlayer.Character:FindFirstChildOfClass('Humanoid') then
  141. Players.LocalPlayer.Character:FindFirstChildOfClass('Humanoid').PlatformStand = false
  142. end
  143. pcall(function() workspace.CurrentCamera.CameraType = Enum.CameraType.Custom end)
  144. end
  145.  
  146.  
  147. function Swim()
  148. workspace.Gravity = workgrag --on
  149. local function swimDied()
  150. workspace.Gravity = workgrag
  151. swimming = false
  152. end
  153. local Humanoid = lplayer.Character:FindFirstChildWhichIsA("Humanoid")
  154. gravReset = Humanoid.Died:Connect(swimDied)
  155. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing,false)
  156. Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown,false)
  157. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Flying,false)
  158. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Freefall,false)
  159. Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp,false)
  160. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping,false)
  161. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Landed,false)
  162. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics,false)
  163. Humanoid:SetStateEnabled(Enum.HumanoidStateType.PlatformStanding,false)
  164. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll,false)
  165. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Running,false)
  166. Humanoid:SetStateEnabled(Enum.HumanoidStateType.RunningNoPhysics,false)
  167. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated,false)
  168. Humanoid:SetStateEnabled(Enum.HumanoidStateType.StrafingNoPhysics,false)
  169. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming,false)
  170. Humanoid:ChangeState(Enum.HumanoidStateType.Swimming)
  171. swimming = true
  172. end
  173.  
  174. function NoSwim()
  175. workspace.Gravity = workgrag --off
  176. swimming = false
  177. if gravReset then
  178. gravReset:Disconnect()
  179. end
  180. local Humanoid = lplayer.Character:FindFirstChildWhichIsA("Humanoid")
  181. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing,true)
  182. Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown,true)
  183. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Flying,true)
  184. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Freefall,true)
  185. Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp,true)
  186. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping,true)
  187. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Landed,true)
  188. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics,true)
  189. Humanoid:SetStateEnabled(Enum.HumanoidStateType.PlatformStanding,true)
  190. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll,true)
  191. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Running,true)
  192. Humanoid:SetStateEnabled(Enum.HumanoidStateType.RunningNoPhysics,true)
  193. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated,true)
  194. Humanoid:SetStateEnabled(Enum.HumanoidStateType.StrafingNoPhysics,true)
  195. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming,true)
  196. Humanoid:ChangeState(Enum.HumanoidStateType.RunningNoPhysics)
  197. end
  198.  
  199. rservice.RenderStepped:connect(function()
  200. while not lhump and not lhum do wait() end
  201. if lhum.MoveDirection.Magnitude > 0 and lhump.Anchored == true and Cbool == true then
  202. movedirection = Model:TranslateBy(lhum.MoveDirection*1.5)
  203. end
  204. end)
  205.  
  206. NoSwim()
  207. NOFLY()
  208.  
  209. Sect:Toggled("Free-Cam",function(t)
  210. while not lhump and not lhum do wait() end
  211. if t then
  212. Swim()
  213. sFLY()
  214. Cbool = true
  215. lhump.Anchored = true
  216. Ccam.CameraSubject = Camera
  217. Camera.Anchored = true
  218. else
  219. NOFLY()
  220. NoSwim()
  221. Cbool = false
  222. Ccam.CameraSubject = lplayer.Character:FindFirstChild("Head")
  223. lhump.Anchored = false
  224. Camera.Anchored = true
  225. end
  226. end)
  227.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement