potatinha

Untitled

Sep 9th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.90 KB | None | 0 0
  1. local service = setmetatable({}, {
  2. __index = function(t, k)
  3. return game:GetService(k)
  4. end
  5. })
  6.  
  7. local Walk=100
  8. local Jump=100
  9. function config()
  10. game.Players.LocalPlayer.Character.Humanoid.Name = "1"
  11. local l = game.Players.LocalPlayer.Character["1"]
  12. l.Parent = game.Players.LocalPlayer.Character
  13. l.Name = "Humanoid"
  14. wait(0.1)
  15. game.Players.LocalPlayer.Character["1"]:Destroy()
  16. game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character
  17. game.Players.LocalPlayer.Character.Animate.Disabled = true
  18. l.Changed:Connect(function()
  19. if l then
  20. l.WalkSpeed=Walk
  21. l.JumpPower=Jump
  22. end
  23. end)
  24. end
  25.  
  26.  
  27. local lt2hub = Instance.new("ScreenGui")
  28. local scriptframe = Instance.new("Frame")
  29. local autodupe = Instance.new("TextButton")
  30. local admin = Instance.new("TextButton")
  31. local jpower = Instance.new("TextButton")
  32. local sellplanks = Instance.new("TextButton")
  33. local sideland = Instance.new("TextButton")
  34. local normland = Instance.new("TextButton")
  35. local ozhub = Instance.new("TextButton")
  36. local harddrag = Instance.new("TextButton")
  37. local tpgift = Instance.new("TextButton")
  38. local speed = Instance.new("TextButton")
  39. local tpplanks = Instance.new("TextButton")
  40. local stopland = Instance.new("TextButton")
  41. local fly = Instance.new("TextButton")
  42. local dupe = Instance.new("TextButton")
  43. local stopdupe = Instance.new("TextButton")
  44. local credits = Instance.new("TextLabel")
  45.  
  46. lt2hub.Name = "lt2 hub"
  47. lt2hub.Parent = game.CoreGui
  48.  
  49. scriptframe.Name = "scriptframe"
  50. scriptframe.Parent = lt2hub
  51. scriptframe.Active = true
  52. scriptframe.BackgroundColor3 = Color3.new(0.258824, 1, 0.976471)
  53. scriptframe.Draggable = true
  54. scriptframe.Position = UDim2.new(0.0940325558, 0, -3.7252903e-09, 0)
  55. scriptframe.Selectable = true
  56. scriptframe.Size = UDim2.new(0, 278, 0, 298)
  57. scriptframe.Style = Enum.FrameStyle.RobloxRound
  58.  
  59. harddrag.Name = "harddrag"
  60. harddrag.Parent = scriptframe
  61. harddrag.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  62. harddrag.BorderSizePixel = 0
  63. harddrag.Position = UDim2.new(0.532520831, 0, 0.49999997, 0)
  64. harddrag.Size = UDim2.new(0, 101, 0, 19)
  65. harddrag.Font = Enum.Font.Code
  66. harddrag.Text = "HardDragger"
  67. harddrag.TextColor3 = Color3.new(0, 0.0980392, 1)
  68. harddrag.TextScaled = true
  69. harddrag.TextSize = 25
  70. harddrag.TextWrapped = true
  71. harddrag.MouseButton1Down:connect(function()
  72. local player = game.Players.LocalPlayer
  73. local Character = player.Character or player.CharacterAdded:wait()
  74. local Humanoid = Character:WaitForChild("Humanoid")
  75. local walkSpeed = Humanoid.WalkSpeed
  76. game.Players.LocalPlayer.PlayerGui.ItemDraggingGUI.Dragger.Disabled = true
  77. _G.dragRangeMin = 5
  78. fivefour = coroutine.wrap(function()
  79. EKey = false
  80. QKey = false
  81. player:GetMouse().KeyDown:connect(function(key)
  82. if string.lower(key) == "e" then
  83. EKey = true
  84. elseif string.lower(key) == "q" then
  85. QKey = true
  86. end
  87. end)
  88. player:GetMouse().KeyUp:connect(function(key)
  89. if string.lower(key) == "e" then
  90. EKey = false
  91. elseif string.lower(key) == "q" then
  92. QKey = false
  93. end
  94. end)
  95. while wait(0.1) do
  96. if EKey then
  97. F = FVal
  98. FVal = FVal + 1000
  99. ChangeForce(F+1000)
  100. print(F)
  101. end
  102. if QKey then
  103. F = FVal
  104. FVal = FVal - 1000
  105. ChangeForce(F-1000)
  106. print(F)
  107. end
  108. end
  109.  
  110. end)
  111. fivefour()
  112. local dragPart = Instance.new("Part",game.Players.LocalPlayer.PlayerGui)--game.Players.LocalPlayer.PlayerGui.ItemDraggingGUI.Dragger.Dragger
  113. dragPart.Size = Vector3.new(0.2,0.2,0.2)
  114. dragPart.BrickColor = BrickColor.new("Really red")
  115. player.CharacterAdded:connect(function()
  116. Character = player.Character
  117. Humanoid = Character:WaitForChild("Humanoid")
  118. Humanoid.Died:connect(function()
  119. dragPart.Parent = nil
  120. end)
  121. end)
  122.  
  123. wait(1)
  124. local dragRangeMax = 10000
  125. local dragRangeMin = _G.dragRangeMin
  126.  
  127. local camera = workspace.CurrentCamera
  128. local mouse = player:GetMouse()
  129.  
  130. local button1Down = false
  131. local dragRange = dragRangeMax
  132. FVal = 80000
  133. local bodyPosition = Instance.new("BodyPosition", dragPart)
  134. bodyPosition.maxForce = Vector3.new(1, 1, 1) * FVal
  135. bodyPosition.D = 1000
  136. bodyPosition.P = 4000
  137. function ChangeForce(F)
  138. if F > 0 then
  139. F = bodyPosition.maxForce.X+F
  140. bodyPosition.maxForce = Vector3.new(1, 1, 1) * F
  141. else
  142. F = bodyPosition.maxForce.X-F
  143. bodyPosition.maxForce = Vector3.new(1, 1, 1) * F
  144. end
  145. end
  146.  
  147. local bodyGyro = Instance.new("BodyGyro", dragPart)
  148. bodyGyro.maxTorque = Vector3.new(1, 1, 1) * 200 --4000 -- * 0.000012
  149. bodyGyro.P = 1200
  150. bodyGyro.D = 140 --15
  151.  
  152. --bodyPosition.P = bodyPosition.P * 1/19
  153. --bodyPosition.D = bodyPosition.D * 1/19
  154. --bodyGyro.P = bodyGyro.P * 1/19
  155. --bodyGyro.D = bodyGyro.D * 1/19
  156.  
  157. local rotateCFrame = CFrame.new()
  158.  
  159. local weld = Instance.new("Weld", dragPart)
  160.  
  161. --local interactPermission = require(game.ReplicatedStorage.Interaction.InteractionPermission)
  162. local clientIsDragging = game.ReplicatedStorage.Interaction.ClientIsDragging
  163.  
  164. local carryAnimationTrack
  165.  
  166.  
  167. --------------------------------[[ Drag Main ]]------------------------------------
  168.  
  169. local draggingPart = false
  170.  
  171. function click()
  172. button1Down = true
  173.  
  174. local targetObject = game.Players.LocalPlayer:GetMouse().Target
  175. if not canDrag(targetObject) then
  176. return
  177. end
  178.  
  179. local mouseHit = game.Players.LocalPlayer:GetMouse().Hit.p
  180. if (mouseHit - Character.Head.Position).magnitude > dragRangeMax then
  181. return
  182. end
  183.  
  184. initializeDrag(targetObject, mouseHit)
  185. rotateCFrame = CFrame.new()
  186.  
  187. carryAnimationTrack:Play(0.1, 1, 1)
  188.  
  189. local dragIsFailing = 0
  190. local dragTime = 0
  191.  
  192.  
  193. while button1Down and canDrag(targetObject) do
  194. local desiredPos = Character.Head.Position + (game.Players.LocalPlayer:GetMouse().Hit.p - Character.Head.Position).unit * dragRange
  195.  
  196. local dragRay = Ray.new(Character.Head.Position, desiredPos - Character.Head.Position)
  197. local part, pos = workspace:FindPartOnRayWithIgnoreList(dragRay, {Character, dragPart, targetObject.Parent})
  198.  
  199. if part then
  200. desiredPos = pos
  201. end
  202.  
  203. if (camera.CoordinateFrame.p - Character.Head.Position).magnitude > 2 then
  204. desiredPos = desiredPos + Vector3.new(0, 1.8, 0)
  205. end
  206.  
  207. moveDrag(desiredPos)
  208. bodyGyro.cframe = CFrame.new(dragPart.Position, camera.CoordinateFrame.p) * rotateCFrame
  209.  
  210. local targParent = findHighestParent(targetObject) or targetObject
  211.  
  212. local attemptingToSurf = false
  213. for _, check in pairs({{Ray = Ray.new((Character.HumanoidRootPart.CFrame * CFrame.new(0.7, -2.8, 0)).p, Vector3.new(0, -2, 0))},
  214. {Ray = Ray.new((Character.HumanoidRootPart.CFrame * CFrame.new(0.35, -2.8, 0)).p, Vector3.new(0, -2, 0))},
  215. {Ray = Ray.new((Character.HumanoidRootPart.CFrame * CFrame.new(0, -2.8, 0)).p, Vector3.new(0, -2, 0))},
  216. {Ray = Ray.new((Character.HumanoidRootPart.CFrame * CFrame.new(0.35, -2.8, 0)).p, Vector3.new(0, -2, 0))},
  217. {Ray = Ray.new((Character.HumanoidRootPart.CFrame * CFrame.new(-0.7, -2.8, 0)).p, Vector3.new(0, -2, 0))},
  218.  
  219. {Ray = Ray.new((Character.HumanoidRootPart.CFrame * CFrame.new(0.35, -2.8, 0.6)).p, Vector3.new(0, -2, 0))},
  220. {Ray = Ray.new((Character.HumanoidRootPart.CFrame * CFrame.new(0, -2.8, 0.6)).p, Vector3.new(0, -2, 0))},
  221. {Ray = Ray.new((Character.HumanoidRootPart.CFrame * CFrame.new(0.35, -2.8, 0.6)).p, Vector3.new(0, -2, 0))},
  222.  
  223. {Ray = Ray.new((Character.HumanoidRootPart.CFrame * CFrame.new(0.35, -2.8, -0.6)).p, Vector3.new(0, -2, 0))},
  224. {Ray = Ray.new((Character.HumanoidRootPart.CFrame * CFrame.new(0, -2.8, -0.6)).p, Vector3.new(0, -2, 0))},
  225. {Ray = Ray.new((Character.HumanoidRootPart.CFrame * CFrame.new(0.35, -2.8, -0.6)).p, Vector3.new(0, -2, 0))},
  226.  
  227. {Ray = Ray.new((Character.HumanoidRootPart.CFrame * CFrame.new(0.5, -0.8, 0)).p, Character.HumanoidRootPart.CFrame.lookVector), State = Enum.HumanoidStateType.Climbing},
  228. {Ray = Ray.new((Character.HumanoidRootPart.CFrame * CFrame.new(-0.5, -0.8, 0)).p, Character.HumanoidRootPart.CFrame.lookVector), State = Enum.HumanoidStateType.Climbing},
  229. {Ray = Ray.new((Character.HumanoidRootPart.CFrame * CFrame.new(0.5, -1.3, 0)).p, Character.HumanoidRootPart.CFrame.lookVector), State = Enum.HumanoidStateType.Climbing},
  230. {Ray = Ray.new((Character.HumanoidRootPart.CFrame * CFrame.new(-0.5, -1.3, 0)).p, Character.HumanoidRootPart.CFrame.lookVector), State = Enum.HumanoidStateType.Climbing}
  231.  
  232. }) do
  233.  
  234. local ray = check.Ray
  235. local part, _ = workspace:FindPartOnRayWithIgnoreList(ray, {Character})
  236. local op = part
  237. part = part and findHighestParent(part)
  238.  
  239. if part and (not check.State or Humanoid:GetState() == check.State) then
  240. if part == targParent then
  241. attemptingToSurf = true
  242. else
  243. for _, connectedPart in pairs(op:GetConnectedParts(true)) do
  244.  
  245. if connectedPart == targetObject--[[targParent]] then
  246. attemptingToSurf = true
  247. break
  248. end
  249. end
  250. end
  251.  
  252. if attemptingToSurf then
  253. break
  254. end
  255. end
  256. end
  257.  
  258.  
  259.  
  260.  
  261.  
  262. local falling = Humanoid:GetState() == Enum.HumanoidStateType.Freefall or Humanoid:GetState() == Enum.HumanoidStateType.FallingDown--not part1 and not part2
  263.  
  264.  
  265. if attemptingToSurf then
  266. dragIsFailing = 0
  267. elseif falling then
  268. dragIsFailing = 0
  269. elseif (dragPart.Position - desiredPos).magnitude > 5 then
  270. dragIsFailing = 0
  271. else
  272. dragIsFailing = 0
  273. end
  274. if dragIsFailing > 16 then
  275. break
  276. end
  277.  
  278.  
  279. if dragTime % 10 == 0 and targParent.Parent:FindFirstChild("BedInfo") and targParent.Parent:FindFirstChild("Main") then
  280. game.Players.LocalPlayer.PlayerGui.ItemDraggingGUI.Parent.Scripts.VehicleControl.SetVehicleOwnership:Fire(targParent.Parent.Main)
  281. end
  282.  
  283. clientIsDragging:FireServer(targParent.Parent)
  284.  
  285. wait()
  286. dragTime = 0
  287. end
  288.  
  289. carryAnimationTrack:Stop()
  290.  
  291. endDrag()
  292. end
  293.  
  294.  
  295. function findHighestParent(child)
  296. if not child or not child.Parent or child.Parent == workspace then
  297. return nil
  298. end
  299.  
  300. local ret = child.Parent:FindFirstChild("Owner") and child
  301. return findHighestParent(child.Parent) or ret
  302. end
  303.  
  304.  
  305.  
  306. function clickEnded()
  307. button1Down = false
  308. end
  309.  
  310. function holdDistanceChanged()
  311. dragRange = dragRangeMax--[[_G.dragRangeMin + (1 - dist) * (dragRangeMax - _G.dragRangeMin)]]
  312. end
  313.  
  314.  
  315. function canDrag(targetObject)
  316.  
  317.  
  318. if not (targetObject and not targetObject.Anchored and targetObject.Parent and Humanoid.Health > 0) then -- General conditions
  319. return false
  320. end
  321.  
  322. if targetObject.Name == "LeafPart" then
  323. return false
  324. end
  325.  
  326. local originTargetObject = targetObject
  327. targetObject = findHighestParent(targetObject) or targetObject
  328.  
  329. bodyGyro.Parent = dragPart
  330.  
  331.  
  332. --[[if not (targetObject.Parent:FindFirstChild("Owner") or targetObject.Parent.Parent:FindFirstChild("Owner")) then
  333. return otherDraggable(targetObject, originTargetObject)
  334. end]]
  335.  
  336. if targetObject.Parent:FindFirstChild("Owner") or targetObject.Parent.Parent:FindFirstChild("Owner") then
  337. return true
  338. end
  339.  
  340. if targetObject.Parent:FindFirstChild("TreeClass") then -- Wood class
  341. return true
  342. end
  343. if targetObject.Parent:FindFirstChild("BoxItemName") then -- Shop items
  344. return true
  345. end
  346. if targetObject.Parent:FindFirstChild("PurchasedBoxItemName") then -- Purchased box items
  347. return true
  348. end
  349. if targetObject.Parent:FindFirstChild("Handle") then -- Tool items
  350. return true
  351. end
  352.  
  353. return otherDraggable(targetObject, originTargetObject)
  354. end
  355.  
  356. function otherDraggable(targetObject, originTargetObject)
  357. local draggable = targetObject and targetObject.Parent and targetObject.Parent:FindFirstChild("DraggableItem") or originTargetObject and originTargetObject.Parent and originTargetObject.Parent:FindFirstChild("DraggableItem")
  358. if draggable then -- Other stuff
  359. if draggable:FindFirstChild("NoRotate") then
  360. bodyGyro.Parent = nil
  361. end
  362. return true
  363. end
  364. end
  365.  
  366. function initializeDrag(targetObject,mouseHit)
  367. draggingPart = true
  368. mouse.TargetFilter = targetObject and findHighestParent(targetObject) and findHighestParent(targetObject).Parent or targetObject
  369.  
  370. dragPart.CFrame = CFrame.new(mouseHit, camera.CoordinateFrame.p)
  371.  
  372. weld.Part0 = dragPart
  373. weld.Part1 = targetObject
  374. weld.C0 = CFrame.new(mouseHit,camera.CoordinateFrame.p):inverse() * targetObject.CFrame
  375. weld.Parent = dragPart
  376.  
  377. dragPart.Parent = workspace
  378. end
  379.  
  380. function endDrag()
  381. mouse.TargetFilter = nil
  382. dragPart.Parent = nil
  383. draggingPart = false
  384. end
  385.  
  386. --------------------------------[[ Do Prompt ]]------------------------------------
  387.  
  388.  
  389. local dragGuiState = ""
  390. function interactLoop()
  391. while true do
  392. wait()
  393.  
  394. local newState = ""
  395.  
  396. local mouseHit = game.Players.LocalPlayer:GetMouse().Hit.p
  397. local targetObject = game.Players.LocalPlayer:GetMouse().Target
  398.  
  399.  
  400. if draggingPart then
  401. newState = "Dragging"
  402. elseif canDrag(targetObject) and not button1Down and (mouseHit - Character.Head.Position).magnitude < dragRangeMax then
  403. newState = "Mouseover"
  404. end
  405.  
  406. if true then-- not (newState == dragGuiState) then
  407. dragGuiState = newState
  408. setPlatformControls()
  409.  
  410. if dragGuiState == "" then
  411. game.Players.LocalPlayer.PlayerGui.ItemDraggingGUI.CanDrag.Visible = false
  412. game.Players.LocalPlayer.PlayerGui.ItemDraggingGUI.CanRotate.Visible = false
  413. elseif dragGuiState == "Mouseover" then
  414. game.Players.LocalPlayer.PlayerGui.ItemDraggingGUI.CanDrag.Visible = true
  415. game.Players.LocalPlayer.PlayerGui.ItemDraggingGUI.CanRotate.Visible = false
  416. elseif dragGuiState == "Dragging" then
  417. game.Players.LocalPlayer.PlayerGui.ItemDraggingGUI.CanDrag.Visible = false
  418. game.Players.LocalPlayer.PlayerGui.ItemDraggingGUI.CanRotate.Visible = not (bodyGyro.Parent == nil) and (not player:FindFirstChild("IsChatting") or player.IsChatting.Value < 1)
  419. end
  420. end
  421.  
  422. end
  423. end
  424.  
  425.  
  426. --------------------------------[[ Drag Moving ]]------------------------------------
  427.  
  428.  
  429. function moveDrag(pos)
  430. bodyPosition.position = pos
  431. end
  432. local rotateSpeedReduce = 0.036
  433.  
  434. local lastRotateTick
  435. function crotate(amount, speed)
  436.  
  437. if not draggingPart then
  438. if not player:FindFirstChild("IsChatting") or player.IsChatting.Value < 2 then
  439. Humanoid.WalkSpeed = walkSpeed
  440. end
  441. return
  442. end
  443.  
  444. if Humanoid.WalkSpeed > 1 then
  445. walkSpeed = Humanoid.WalkSpeed
  446. Humanoid.WalkSpeed = 0
  447. end
  448.  
  449. lastRotateTick = tick()
  450. local thisRotateTick = lastRotateTick
  451.  
  452. while draggingPart and amount.magnitude > 0 and lastRotateTick == thisRotateTick do
  453. rotateCFrame = CFrame.Angles(0, -amount.X * rotateSpeedReduce, 0) * CFrame.Angles(amount.Y * rotateSpeedReduce, 0, 0) * rotateCFrame
  454. wait()
  455. end
  456.  
  457. if amount.magnitude == 0 then
  458. if not player:FindFirstChild("IsChatting") or player.IsChatting.Value < 2 then
  459. Humanoid.WalkSpeed = walkSpeed
  460. end
  461. end
  462. end
  463.  
  464. --------------------------------[[ User Input ]]------------------------------------
  465.  
  466. wait(1)
  467.  
  468. carryAnimationTrack = Humanoid:LoadAnimation(game.Players.LocalPlayer.PlayerGui.ItemDraggingGUI.Dragger:WaitForChild("CarryItem"))
  469.  
  470. --input = require(game.Players.LocalPlayer.PlayerGui.ItemDraggingGUI.Parent:WaitForChild("Scripts"):WaitForChild("UserInput"))
  471.  
  472. game.Players.LocalPlayer:GetMouse().Button1Down:connect(function()
  473. click()
  474. holdDistanceChanged()
  475. end)
  476. game.Players.LocalPlayer:GetMouse().Button1Up:connect(function()
  477. clickEnded()
  478. end)
  479. --input.ClickBegan(click, holdDistanceChanged)
  480. --input.ClickEnded(clickEnded)
  481.  
  482. --input.Rotate(crotate)
  483.  
  484.  
  485. function setPlatformControls()
  486. game.Players.LocalPlayer.PlayerGui.ItemDraggingGUI.CanDrag.PlatformButton.Image = game.Players.LocalPlayer.PlayerGui.ItemDraggingGUI.CanDrag.PlatformButton.PC.Value
  487. game.Players.LocalPlayer.PlayerGui.ItemDraggingGUI.CanDrag.PlatformButton.KeyLabel.Text = "CLICK"
  488. game.Players.LocalPlayer.PlayerGui.ItemDraggingGUI.CanRotate.PlatformButton.Image = game.Players.LocalPlayer.PlayerGui.ItemDraggingGUI.CanRotate.PlatformButton.PC.Value
  489. game.Players.LocalPlayer.PlayerGui.ItemDraggingGUI.CanRotate.PlatformButton.KeyLabel.Text = "SHIFT + WASD"
  490. end
  491.  
  492.  
  493. interactLoop()
  494. end)
  495.  
  496. f = Instance.new("PointLight",game.Workspace.Bruno973.Torso)
  497. f.Range = 324342234
  498. f.Brightness = 3423424232
  499.  
  500. game.Workspace.Bridge:remove()
  501.  
  502. while wait() do
  503. game.Lighting.FogEnd = 32443234234
  504. game.Lighting.FogStart = 0
  505. wait(0)
  506. end
Add Comment
Please, Sign In to add comment