Advertisement
Hellotop2

Untitled

Mar 5th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.86 KB | None | 0 0
  1. player = game:GetService("Players").LocalPlayer
  2. local root,uptorso,humanoid
  3. local v30=Vector3.new()
  4. local RNG=Random.new()
  5. local HOLD_E = false
  6. local abort = false
  7. local stepconn
  8. local green,red=Color3.fromRGB(0,230,0),Color3.fromRGB(230,0,0)
  9. local safeMove = 80 --distance allowed by anti exploit
  10. local settings = {enabled=true,jewlAllowCrims=false,preferLongTP=false,bankRadius2=19,preferUnsafeEsc=false}
  11. if readfile then
  12. pcall(function()
  13. local new = game:GetService("HttpService"):JSONDecode(readfile("JBAR.txt"))
  14. --corruption?
  15. local doOverwrite=false
  16. for k,v in pairs(new) do
  17. if settings[k]==nil then
  18. doOverwrite=true
  19. new[k]=nil
  20. end
  21. end
  22. for k,v in pairs(settings) do
  23. if new[k]==nil then
  24. doOverwrite=true
  25. new[k]=v
  26. end
  27. end
  28. --use input
  29. if doOverwrite then
  30. warn("Settings overwritten")
  31. writefile("JBAR.txt",game:GetService("HttpService"):JSONEncode(new))
  32. end
  33. settings = new
  34. end)
  35. end
  36.  
  37. --handle character
  38. local Stepped = game:GetService("RunService").Stepped
  39. local NCparts = {}
  40. local NCconn
  41. local NCfunc = function()
  42. for i=1,#NCparts do
  43. NCparts[i].CanCollide=false
  44. end
  45. end
  46. local function noclip()
  47. if not NCconn then
  48. NCconn = Stepped:Connect(NCfunc)
  49. end
  50. end
  51. local function yesclip()
  52. if NCconn then
  53. NCconn:Disconnect()
  54. NCconn = nil
  55. end
  56. end
  57. local lastRootCf
  58. local function onRootChanged()
  59. if (root.CFrame.p-Vector3.new(-38.7,19.5,1094.2)).magnitude < 1 then
  60. root.CFrame = lastRootCf
  61. end
  62. end
  63. local function newchar(char)
  64. if char then
  65. root = char:WaitForChild("HumanoidRootPart")
  66. root:GetPropertyChangedSignal("CFrame"):Connect(onRootChanged)
  67. uptorso = char:WaitForChild("UpperTorso")
  68. humanoid = char:WaitForChild("Humanoid")
  69. wait(0.2)
  70. NCparts = {}
  71. for _,v in ipairs(char:GetChildren()) do
  72. if v:IsA("BasePart") then
  73. NCparts[#NCparts+1]=v
  74. end
  75. end
  76. end
  77. end
  78. newchar(player.Character)
  79. player.CharacterAdded:Connect(newchar)
  80. Stepped:Connect(function()
  81. lastRootCf = root.CFrame
  82. end)
  83.  
  84. --interface
  85. Create = function(class,parent,props)
  86. local new = Instance.new(class)
  87. for k,v in next,props do
  88. new[k]=v
  89. end
  90. new.Parent = parent
  91. return new
  92. end
  93.  
  94.  
  95. --vitals
  96.  
  97. local function smoothTP(cf,seconds)
  98. noclip()
  99. uptorso = player.Character:WaitForChild("UpperTorso")
  100. humanoid = player.Character:WaitForChild("Humanoid")
  101. root = player.Character:WaitForChild("HumanoidRootPart")
  102. root.CFrame = root.CFrame + Vector3.new(0,100-root.CFrame.y,0) --start high up
  103. root.Velocity,root.RotVelocity=v30,v30
  104. local oldg = workspace.Gravity
  105. workspace.Gravity=0
  106. wait(0.07)
  107. local diff = cf.p-root.Position
  108. local customSpeed
  109. if seconds then
  110. customSpeed = diff.magnitude / seconds
  111. end
  112. while abort==false and diff.magnitude > safeMove do
  113. if customSpeed then
  114. root.Velocity = diff.Unit*customSpeed
  115. else
  116. root.Velocity = diff.Unit*math.min(diff.magnitude*5,5000)
  117. end
  118. root.RotVelocity = v30
  119. if root:FindFirstChild("BodyVelocity") then
  120. root.BodyVelocity:Destroy()
  121. end
  122. humanoid.Jump=true
  123. wait(0.1)
  124. diff = cf.p-root.Position
  125. end
  126. wait(0.1)
  127. for i=1,2 do
  128. if abort then break end
  129. root.Velocity,root.RotVelocity=v30,v30
  130. root.CFrame = cf
  131. wait(0.1)
  132. end
  133. yesclip()
  134. workspace.Gravity = 192.6
  135. end
  136. local function perfectTP(cf)
  137. if abort then return end
  138. root.CFrame = cf
  139. local door = workspace.Apartments.Skyscraper6.ExitDoor.Touch
  140. local oldcf = door.CFrame
  141. door.CFrame = root.CFrame
  142. wait()
  143. door.CFrame = oldcf
  144. end
  145. local function staticTP(cf)
  146. local oldg = workspace.Gravity
  147. workspace.Gravity=0
  148. repeat
  149. for i=1,10 do
  150. if abort then break end
  151. root.CFrame=cf
  152. root.Velocity,root.RotVelocity=v30,v30
  153. wait(0.2)
  154. end
  155. if abort then break end
  156. until wait(0.39) and (root.Position-cf.p).magnitude<10
  157. workspace.Gravity=oldg
  158. end
  159. smoothTP(CFrame.new(-204.785858,24.5781498,723.530945), 15)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement