Advertisement
2AreYouMental110

Game Annoyance (Tp in front of cutscene and tp around player's)

Aug 31st, 2023 (edited)
913
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.94 KB | None | 0 0
  1. local s = {}
  2. local tpcam = false
  3. local tpcamon = false
  4. local dropdownenabled = false
  5. local supportgetgenv = false
  6. local tpplron = false
  7. local radius = 5
  8. local lastpos
  9. local lastpos2
  10. local selectedplr
  11. local success,err = pcall(function()
  12.     if typeof(getgenv()) == "table" then
  13.         supportgetgenv = true
  14.     end
  15. end)
  16. if not getgenv().bypassedadonis then
  17.     local success,err = pcall(function()
  18.         for k,v in pairs(getgc(true)) do -- https://v3rmillion.net/showthread.php?tid=1209519
  19.             if pcall(function() return rawget(v,"indexInstance") end) and type(rawget(v,"indexInstance")) == "table" and  (rawget(v,"indexInstance"))[1] == "kick" then
  20.                 bypassed = true
  21.                 v.tvk = {"kick",function() return game.Workspace:WaitForChild("") end}
  22.             end
  23.         end
  24.     end)
  25. end
  26. if supportgetgenv then
  27.     getgenv().bypassedadonis = true
  28. end
  29. table.insert(s,workspace.CurrentCamera:GetPropertyChangedSignal("CameraType"):Connect(function()
  30.     if workspace.CurrentCamera.CameraType == Enum.CameraType.Scriptable then
  31.         print("camera cutscene found")
  32.         tpcam = true
  33.         lastpos = game.Players.LocalPlayer.Character:GetPivot()
  34.         if tpcamon then
  35.             game.Players.LocalPlayer.Character:WaitForChild("HumanoidRootPart",math.huge)
  36.             if not game.Players.LocalPlayer.Character.HumanoidRootPart:FindFirstChild("BodyVelocity") then
  37.                 local bodyvel = Instance.new("BodyVelocity")
  38.                 bodyvel.Velocity = Vector3.new(0,0,0)
  39.                 bodyvel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  40.                 bodyvel.P = 1000
  41.                 bodyvel.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
  42.             end
  43.         end
  44.     else
  45.         print("camera is not a cutscene :/")
  46.         tpcam = false
  47.         if lastpos then
  48.             game.Players.LocalPlayer.Character:PivotTo(lastpos)
  49.         end
  50.         if game.Players.LocalPlayer.Character.HumanoidRootPart:FindFirstChild("BodyVelocity") then
  51.             game.Players.LocalPlayer.Character.HumanoidRootPart.BodyVelocity:Destroy()
  52.         end
  53.     end
  54. end))
  55. table.insert(s,workspace.CurrentCamera:GetPropertyChangedSignal("CFrame"):Connect(function()
  56.     if tpcam and tpcamon then
  57.         warn("teleporting to cam")
  58.         game.Players.LocalPlayer.Character:PivotTo(workspace.CurrentCamera.CFrame * CFrame.new(0,1,-1))
  59.     end
  60. end))
  61. table.insert(s,game.Players.LocalPlayer.CharacterAdded:Connect(function(char)
  62.     if (tpcam and tpcamon) or (selectedplr and tpplron) then
  63.         char:WaitForChild("HumanoidRootPart",math.huge)
  64.         local bodyvel = Instance.new("BodyVelocity")
  65.         bodyvel.Velocity = Vector3.new(0,0,0)
  66.         bodyvel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  67.         bodyvel.P = 1000
  68.         bodyvel.Parent = char.HumanoidRootPart
  69.     end
  70. end))
  71. local gui = Instance.new("ScreenGui")
  72. if supportgetgenv then
  73.     if getgenv().cameraguilol and getgenv().cameraguidelete then
  74.         getgenv().cameraguidelete()
  75.     end
  76.     getgenv().cameraguilol = gui
  77. end
  78. gui.Name = ""
  79. for i=1,50 do
  80.     gui.Name = gui.Name..tostring(math.random(1,9))
  81. end
  82. gui.ResetOnSpawn = false
  83. gui.Parent = game.CoreGui
  84.  
  85. local mainframe = Instance.new("Frame")
  86. mainframe.BackgroundColor3 = Color3.fromRGB(50,50,50)
  87. mainframe.BorderColor3 = Color3.fromRGB(255,255,255)
  88. mainframe.Size = UDim2.new(.3,0,.6,0)
  89. mainframe.Position = UDim2.new(.35,0,.2)
  90. mainframe.Active = true
  91. mainframe.Draggable = true
  92. mainframe.Parent = gui
  93. local constraint = Instance.new("UIAspectRatioConstraint")
  94. constraint.AspectType = Enum.AspectType.ScaleWithParentSize
  95. constraint.Parent = mainframe
  96. local title = Instance.new("TextLabel")
  97. title.Size = UDim2.new(1,0,.1,0)
  98. title.Text = "Game Annoyance"
  99. title.TextScaled = true
  100. title.TextColor3 = Color3.fromRGB(255,255,255)
  101. title.BackgroundColor3 = Color3.fromRGB(50,50,50)
  102. title.BorderColor3 = Color3.fromRGB(255,255,255)
  103. title.Parent = mainframe
  104. local credits = Instance.new("TextLabel")
  105. credits.Size = UDim2.new(1,0,.05,0)
  106. credits.Position = UDim2.new(0,0,.1,0)
  107. credits.Text = "By 2AreYouMental110"
  108. credits.TextScaled = true
  109. credits.TextColor3 = Color3.fromRGB(255,255,255)
  110. credits.BackgroundColor3 = Color3.fromRGB(50,50,50)
  111. credits.BorderColor3 = Color3.fromRGB(255,255,255)
  112. credits.Parent = mainframe
  113.  
  114. local playerdropdown = Instance.new("TextButton")
  115. playerdropdown.Size = UDim2.new(.2,0,.2,0)
  116. playerdropdown.Position = UDim2.new(0.1,0,.2,0)
  117. playerdropdown.Text = "Players"
  118. playerdropdown.TextScaled = true
  119. playerdropdown.TextColor3 = Color3.fromRGB(255,255,255)
  120. playerdropdown.BackgroundColor3 = Color3.fromRGB(50,50,50)
  121. playerdropdown.BorderColor3 = Color3.fromRGB(255,255,255)
  122. playerdropdown.Parent = mainframe
  123. local dropdownframe = Instance.new("ScrollingFrame")
  124. dropdownframe.Size = UDim2.new(1.5,0,10,0)
  125. dropdownframe.Position = UDim2.new(-.25,0,1,0)
  126. dropdownframe.BackgroundColor3 = Color3.fromRGB(50,50,50)
  127. dropdownframe.BorderColor3 = Color3.fromRGB(255,255,255)
  128. dropdownframe.ZIndex = 100
  129. dropdownframe.CanvasSize = UDim2.new(0,0,100,0)
  130. dropdownframe.Visible = false
  131. dropdownframe.Parent = playerdropdown
  132. local sort = Instance.new("UIListLayout")
  133. sort.Parent = dropdownframe
  134. table.insert(s,playerdropdown.MouseButton1Click:Connect(function()
  135.     dropdownenabled = not dropdownenabled
  136.     dropdownframe.Visible = dropdownenabled
  137. end))
  138. local autotpbutton = Instance.new("TextButton")
  139. autotpbutton.Size = UDim2.new(.2,0,.2,0)
  140. autotpbutton.Position = UDim2.new(0.4,0,.2,0)
  141. autotpbutton.Text = "Auto TP to cutscene camera: OFF"
  142. autotpbutton.TextScaled = true
  143. autotpbutton.TextColor3 = Color3.fromRGB(255,255,255)
  144. autotpbutton.BackgroundColor3 = Color3.fromRGB(50,50,50)
  145. autotpbutton.BorderColor3 = Color3.fromRGB(255,255,255)
  146. autotpbutton.Parent = mainframe
  147. table.insert(s,autotpbutton.MouseButton1Click:Connect(function()
  148.     tpcamon = not tpcamon
  149.     if tpcamon then
  150.         autotpbutton.Text = "Auto TP to cutscene camera: ON"
  151.     else
  152.         autotpbutton.Text = "Auto TP to cutscene camera: OFF"
  153.     end
  154. end))
  155.  
  156. local autotpbutton2 = Instance.new("TextButton")
  157. autotpbutton2.Size = UDim2.new(.2,0,.2,0)
  158. autotpbutton2.Position = UDim2.new(0.7,0,.2,0)
  159. autotpbutton2.Text = "Auto TP around selected player: OFF"
  160. autotpbutton2.TextScaled = true
  161. autotpbutton2.TextColor3 = Color3.fromRGB(255,255,255)
  162. autotpbutton2.BackgroundColor3 = Color3.fromRGB(50,50,50)
  163. autotpbutton2.BorderColor3 = Color3.fromRGB(255,255,255)
  164. autotpbutton2.Parent = mainframe
  165. table.insert(s,autotpbutton2.MouseButton1Click:Connect(function()
  166.     tpplron = not tpplron
  167.     if tpplron then
  168.         autotpbutton2.Text = "Auto TP around selected player: ON"
  169.         if selectedplr then
  170.             local bodyvel = Instance.new("BodyVelocity")
  171.             bodyvel.Velocity = Vector3.new(0,0,0)
  172.             bodyvel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  173.             bodyvel.P = 1000
  174.             bodyvel.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
  175.             lastpos2 = game.Players.LocalPlayer.Character:GetPivot()
  176.         end
  177.     else
  178.         autotpbutton2.Text = "Auto TP around selected player: OFF"
  179.         if game.Players.LocalPlayer.Character.HumanoidRootPart:FindFirstChild("BodyVelocity") then
  180.             game.Players.LocalPlayer.Character.HumanoidRootPart.BodyVelocity:Destroy()
  181.         end
  182.         if lastpos2 then
  183.             game.Players.LocalPlayer.Character:PivotTo(lastpos2)
  184.         end
  185.     end
  186. end))
  187.  
  188. local tpradiustextbox = Instance.new("TextBox")
  189. tpradiustextbox.Size = UDim2.new(.2,0,.2,0)
  190. tpradiustextbox.Position = UDim2.new(0.1,0,.5,0)
  191. tpradiustextbox.Text = ""
  192. tpradiustextbox.PlaceholderText = "Put radius of where to tp here! (automatically set to 5)"
  193. tpradiustextbox.TextScaled = true
  194. tpradiustextbox.TextColor3 = Color3.fromRGB(255,255,255)
  195. tpradiustextbox.BackgroundColor3 = Color3.fromRGB(50,50,50)
  196. tpradiustextbox.BorderColor3 = Color3.fromRGB(255,255,255)
  197. tpradiustextbox.Parent = mainframe
  198. table.insert(s,tpradiustextbox.FocusLost:Connect(function()
  199.     local num = tonumber(tpradiustextbox.Text)
  200.     if typeof(num) == "number" then
  201.         radius = num
  202.     end
  203. end))
  204.  
  205. function doplr(plr)
  206.     local button = Instance.new("TextButton")
  207.     button.Size = UDim2.new(.85,0,.01,0)
  208.     button.ZIndex = 101
  209.     button.Text = plr.Name
  210.     if game.ReplicatedStorage:FindFirstChild("Season") and game.ReplicatedStorage.Season:FindFirstChild("Players") and game.ReplicatedStorage.Season.Players:FindFirstChild(plr.Name) then
  211.         button.Text = plr.Name.." | "..game.ReplicatedStorage.Season.Players[plr.Name].Value
  212.     end
  213.     button.TextScaled = true
  214.     button.TextColor3 = Color3.fromRGB(255,255,255)
  215.     button.BackgroundColor3 = Color3.fromRGB(50,50,50)
  216.     button.BorderColor3 = Color3.fromRGB(255,255,255)
  217.     button.Name = plr.Name
  218.     button.Parent = dropdownframe
  219.     table.insert(s,button.MouseButton1Click:Connect(function()
  220.         dropdownenabled = not dropdownenabled
  221.         dropdownframe.Visible = dropdownenabled
  222.         selectedplr = plr
  223.     end))
  224. end
  225.  
  226. table.insert(s,game.Players.PlayerAdded:Connect(function(plr)
  227.     doplr(plr)
  228. end))
  229. table.insert(s,game.Players.PlayerRemoving:Connect(function(plr)
  230.     local plr = dropdownframe:FindFirstChild(plr.Name)
  231.     if plr then
  232.         plr:Destroy()
  233.     end
  234. end))
  235. for i,v in pairs(game.Players:GetPlayers()) do
  236.     doplr(v)
  237. end
  238.  
  239. table.insert(s,game:GetService("RunService").RenderStepped:Connect(function()
  240.     if selectedplr and tpplron then
  241.         local charcframe = selectedplr.Character:GetPivot()
  242.         local randpos = Vector3.new(math.random(-(radius/2),radius/2),math.random(-(radius/2),radius/2),math.random(-(radius/2),radius/2))
  243.         game.Players.LocalPlayer.Character:PivotTo(charcframe + randpos)
  244.     end
  245. end))
  246.  
  247. function guidelete()
  248.     gui:Destroy()
  249.     tpcam = false
  250.     tpcamon = false
  251.     tpplron = false
  252.     for i,v in pairs(s) do
  253.         v:Disconnect()
  254.     end
  255. end
  256. if supportgetgenv then
  257.     getgenv().cameraguidelete = guidelete
  258. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement