Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.97 KB | None | 0 0
  1. --[[ space's custom hopperbins ]]--
  2.  
  3. local version = 0.1
  4. local FE = function() if game.Workspace.FilteringEnabled == true then return "enabled" else return "disabled" end end
  5.  
  6. local Workspace = game:GetService("Workspace")
  7. local Players = game:GetService("Players")
  8. local UserInputService = game:GetService("UserInputService")
  9. local RunService = game:GetService("RunService")
  10.  
  11. local Keybinds = {
  12. ["ChangeOption"] = Enum.KeyCode.L,
  13. ["Action"] = Enum.KeyCode.V,
  14. }
  15.  
  16. SwitchColor = function(target, endcolor)
  17. target.BackgroundColor3 = Color3.new(endcolor.r, endcolor.g, endcolor.b)
  18. end
  19. TweenSize = function(target, size, direction, style, time_, override) target:TweenSize(size, direction, style, time_, override) end
  20. DrawLine = function() end
  21.  
  22. local CopyColor = Color3.new(1, 1, 1)
  23. local RemoveColor = Color3.new(0.77647058823529, 0, 0)
  24. local MoveColor = Color3.new(0, 0.56862745098039, 1)
  25.  
  26. local LocalPlayer = Players.LocalPlayer
  27. local Mouse = LocalPlayer:GetMouse()
  28. local Camera = Workspace.CurrentCamera
  29. local Mode = 0
  30. local SB = Instance.new("SelectionBox", Camera) SB.Color3 = Color3.fromRGB(255, 255, 255)
  31. local Activation = false
  32. local StorePreviousActivationAnchored = false
  33.  
  34. local sc, mf, tf, ml, nl, pl, sl
  35.  
  36. function Setup()
  37. print("\nLoading space's custom hopperbins v"..tostring(version)..". \nFiltering Enabled is "..tostring(FE())..".\n")
  38. sc = Instance.new("ScreenGui", game.CoreGui)
  39. sc.Name = "space's custom hopperbins"
  40. mf = Instance.new("Frame", sc)
  41. mf.Name = "MainFrame"
  42. mf.BackgroundTransparency = 1
  43. mf.Size = UDim2.new(0, 150, 0, 50)
  44. mf.ClipsDescendants = true
  45. tf = Instance.new("Frame", mf)
  46. tf.Name = "TopFrame"
  47. tf.Position = UDim2.new(0, 0, 0.25, 0)
  48. tf.Size = UDim2.new(1, 0, 0, 1)
  49. tf.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  50. tf.BackgroundTransparency = 0.5
  51. tf.BorderSizePixel = 0
  52. ml = Instance.new("TextLabel", mf)
  53. ml.Name = "ModeLabel"
  54. ml.Size = UDim2.new(1, 0, 0.25, 0)
  55. ml.BackgroundTransparency = 1
  56. ml.Font = Enum.Font.ArialBold
  57. ml.Text = "Copy"
  58. ml.TextColor3 = Color3.fromRGB(255, 255, 255)
  59. ml.TextSize = 9
  60. ml.TextStrokeTransparency = 1
  61. nl = Instance.new("TextLabel", mf)
  62. nl.Name = "NameLabel"
  63. nl.Position = UDim2.new(0, 0, 0.25, 0)
  64. nl.Size = UDim2.new(1, 0, 0.25, 0)
  65. nl.BackgroundTransparency = 1
  66. nl.Font = Enum.Font.ArialBold
  67. nl.Text = ""
  68. nl.TextColor3 = Color3.fromRGB(255, 255, 255)
  69. nl.TextSize = 9
  70. nl.TextStrokeTransparency = 1
  71. pl = Instance.new("TextLabel", mf)
  72. pl.Name = "PosLabel"
  73. pl.Position = UDim2.new(0, 0, 0.5, 0)
  74. pl.Size = UDim2.new(1, 0, 0.25, 0)
  75. pl.BackgroundTransparency = 1
  76. pl.Font = Enum.Font.Arial
  77. pl.Text = ""
  78. pl.TextColor3 = Color3.fromRGB(255, 255, 255)
  79. pl.TextSize = 9
  80. pl.TextStrokeTransparency = 1
  81. sl = Instance.new("TextLabel", mf)
  82. sl.Name = "SizeLabel"
  83. sl.Position = UDim2.new(0, 0, 0.75, 0)
  84. sl.Size = UDim2.new(1, 0, 0.25, 0)
  85. sl.BackgroundTransparency = 1
  86. sl.Font = Enum.Font.Arial
  87. sl.Text = ""
  88. sl.TextColor3 = Color3.fromRGB(255, 255, 255)
  89. sl.TextSize = 9
  90. sl.TextStrokeTransparency = 1
  91. end
  92. Setup()
  93.  
  94. Mouse.Move:connect(function()
  95. local posx, posy, target = Mouse.X, Mouse.Y, Mouse.Target
  96. mf:TweenPosition(UDim2.new(0, posx - mf.Size.X.Offset - 15, 0, posy), Enum.EasingDirection.Out, Enum.EasingStyle.Sine, 0.1, true)
  97. if Activation then
  98. Activation.Position = Vector3.new(math.ceil(Mouse.Hit.p.X), math.ceil(Mouse.Hit.p.Y), math.ceil(Mouse.Hit.p.Z))
  99. else
  100. if target then
  101. nl.Text = target.Name
  102. pl.Text = tostring(math.ceil(target.Position.X)..", "..math.ceil(target.Position.Y)..", "..math.ceil(target.Position.Z))
  103. sl.Text = tostring(math.ceil(target.Size.X)..", "..math.ceil(target.Size.Y)..", "..math.ceil(target.Size.Z))
  104. SB.Adornee = target
  105. else
  106. nl.Text = "-"
  107. pl.Text = "-"
  108. sl.Text = "-"
  109. SB.Adornee = nil
  110. end
  111. end
  112. end)
  113.  
  114. function Action()
  115. if Mode == 0 then
  116. local c = Mouse.target:Clone()
  117. c.Parent = Mouse.target.Parent
  118. c.Position = Mouse.target.Position
  119. elseif Mode == 1 then
  120. StorePreviousActivationAnchored = Mouse.target.Anchored
  121. Mouse.target.Anchored = true
  122. Activation = Mouse.target
  123. Mouse.TargetFilter = Activation
  124. else
  125. Mouse.target:Destroy()
  126. end
  127. end
  128.  
  129. function ChangeOption()
  130. if Mode == 0 then
  131. Mode = 1
  132. ml.Text = "Move"
  133. SwitchColor(tf, MoveColor)
  134. elseif Mode == 1 then
  135. Mode = 2
  136. ml.Text = "Remove"
  137. SwitchColor(tf, RemoveColor)
  138. else
  139. Mode = 0
  140. ml.Text = "Copy"
  141. SwitchColor(tf, CopyColor)
  142. end
  143. end
  144.  
  145. UserInputService.InputBegan:connect(function(input)
  146. if input.UserInputType == Enum.UserInputType.Keyboard then
  147. if input.KeyCode == Keybinds["ChangeOption"] then
  148. ChangeOption()
  149. elseif input.KeyCode == Keybinds["Action"] then
  150. Action()
  151. end
  152. end
  153. end)
  154.  
  155. UserInputService.InputEnded:connect(function(input)
  156. if input.UserInputType == Enum.UserInputType.Keyboard then
  157. if input.KeyCode == Keybinds["Action"] then
  158. Activation.Anchored = StorePreviousActivationAnchored
  159. Mouse.TargetFilter = nil
  160. Activation = nil
  161. end
  162. end
  163. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement