Advertisement
DaRedJumper

bobtyper

Nov 2nd, 2024 (edited)
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.09 KB | None | 0 0
  1. print("bobtyper v1.2 made by daredjumper (bobby)")
  2. local serverstick = false
  3.  
  4. local datyper = Instance.new("Part")
  5. datyper.BottomSurface = Enum.SurfaceType.Smooth
  6. datyper.BrickColor = BrickColor.new(0.38823533058166504, 0.37254902720451355, 0.38431376218795776)
  7. datyper.CFrame = CFrame.fromMatrix(Vector3.new(-24.375, 8.525003433227539, -10.425000190734863), Vector3.new(1, 0, 0), Vector3.new(0, 0.9961950778961182, 0.08715580403804779), Vector3.new(0, -0.08715575933456421, 0.9961950778961182))
  8. datyper.Color = Color3.new(0.388235, 0.372549, 0.384314)
  9. datyper.Orientation = Vector3.new(5, 0, 0)
  10. datyper.Rotation = Vector3.new(5, 0, 0)
  11. datyper.Size = Vector3.new(16.75, 11.25, 0.44999992847442627)
  12. datyper.TopSurface = Enum.SurfaceType.Smooth
  13. datyper.Name = owner.Name.."-datyper"
  14. datyper.Parent = script
  15. datyper.Anchored = true
  16. datyper.Transparency = .7
  17. datyper.CanCollide = false
  18.  
  19. local surface_gui = Instance.new("SurfaceGui")
  20. surface_gui.ClipsDescendants = true
  21. surface_gui.LightInfluence = 1
  22. surface_gui.MaxDistance = 1000
  23. surface_gui.SizingMode = Enum.SurfaceGuiSizingMode.PixelsPerStud
  24. surface_gui.Face = Enum.NormalId.Back
  25. surface_gui.ResetOnSpawn = true
  26. surface_gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  27. surface_gui.Parent = datyper
  28. surface_gui.LightInfluence = 0
  29.  
  30. local scrolling_frame = Instance.new("ScrollingFrame")
  31. scrolling_frame.CanvasSize = UDim2.new(0, 0, 234, 0)
  32. scrolling_frame.ScrollBarImageColor3 = Color3.new(0, 0, 0)
  33. scrolling_frame.Active = true
  34. scrolling_frame.BackgroundColor3 = Color3.new(1, 1, 1)
  35. scrolling_frame.BorderColor3 = Color3.new(0, 0, 0)
  36. scrolling_frame.BorderSizePixel = 0
  37. scrolling_frame.Size = UDim2.new(1, 0, 1, 0)
  38. scrolling_frame.Visible = true
  39. scrolling_frame.Parent = surface_gui
  40.  
  41. local typer = Instance.new("TextBox")
  42. typer.CursorPosition = -1
  43. typer.Font = Enum.Font.Code
  44. typer.MultiLine = true
  45. typer.PlaceholderText = "type here i guess"
  46. typer.Text = ""
  47. typer.TextColor3 = Color3.new(1, 1, 1)
  48. typer.TextSize = 21
  49. typer.TextWrapped = true
  50. typer.TextXAlignment = Enum.TextXAlignment.Left
  51. typer.TextYAlignment = Enum.TextYAlignment.Top
  52. typer.BackgroundColor3 = Color3.new(0.105882, 0.105882, 0.105882)
  53. typer.BorderColor3 = Color3.new(0, 0, 0)
  54. typer.BorderSizePixel = 0
  55. typer.Size = UDim2.new(1, 0, 1, 0)
  56. typer.Visible = true
  57. typer.Name = "typer"
  58. typer.Parent = scrolling_frame
  59. typer.ClearTextOnFocus = false
  60. typer.Visible = false
  61.  
  62. local typerServer = Instance.new("TextBox")
  63. typerServer.TextEditable = false
  64. typerServer.Font = Enum.Font.Code
  65. --typerServer.MultiLine = true
  66. --typerServer.PlaceholderText = "type here i guess"
  67. typerServer.Text = ""
  68. typerServer.TextColor3 = Color3.new(1, 1, 1)
  69. typerServer.TextSize = 21
  70. typerServer.TextWrapped = true
  71. typerServer.TextXAlignment = Enum.TextXAlignment.Left
  72. typerServer.TextYAlignment = Enum.TextYAlignment.Top
  73. typerServer.BackgroundColor3 = Color3.new(0.105882, 0.105882, 0.105882)
  74. typerServer.BorderColor3 = Color3.new(0, 0, 0)
  75. typerServer.BorderSizePixel = 0
  76. typerServer.Size = UDim2.new(1, 0, 1, 0)
  77. typerServer.Visible = true
  78. typerServer.Name = "typerServer"
  79. typerServer.Parent = scrolling_frame
  80. typerServer.ClearTextOnFocus = false
  81. --typerServer.ClearTextOnFocus = false
  82.  
  83. local stickSound = Instance.new("Sound", datyper)
  84. stickSound.Volume = 4
  85. stickSound.Name = "stickSound"
  86. stickSound.SoundId = "rbxassetid://12221967"
  87.  
  88.  
  89.  
  90. if not game:GetService("ReplicatedStorage"):FindFirstChild(owner.Name.."typerRemote") then
  91.     local typerRemote = Instance.new("RemoteEvent", game:GetService("ReplicatedStorage"))
  92.     typerRemote.Name = owner.Name.."typerRemote"
  93.  
  94.     typerRemote.OnServerEvent:Connect(function(plr, text)
  95.         typerServer.Text = text
  96.     end)
  97. else
  98.     game:GetService("ReplicatedStorage"):FindFirstChild(owner.Name.."typerRemote").OnServerEvent:Connect(function(plr, text)
  99.         typerServer.Text = text
  100.     end)
  101. end
  102.  
  103. if not game:GetService("ReplicatedStorage"):FindFirstChild(owner.Name.."stickRemote") then
  104.     local stickRemote = Instance.new("RemoteEvent", game:GetService("ReplicatedStorage"))
  105.     stickRemote.Name = owner.Name.."stickRemote"
  106.  
  107.     stickRemote.OnServerEvent:Connect(function(plr, info)
  108.         if info == 0 then
  109.             serverstick = true
  110.             stickSound.Playing = true
  111.             local selection_box = Instance.new("SelectionBox", datyper)
  112.             selection_box.Adornee = datyper
  113.             selection_box.Name = "someoutlinedunno"
  114.             selection_box.Visible = true
  115.             selection_box.Color3 = Color3.fromRGB(13, 105, 172)
  116.         else
  117.             serverstick = false
  118.             stickSound.Playing = true
  119.             datyper:FindFirstChild("someoutlinedunno"):Destroy()
  120.         end
  121.     end)
  122. else
  123.     game:GetService("ReplicatedStorage"):FindFirstChild(owner.Name.."stickRemote").OnServerEvent:Connect(function(plr, info)
  124.         if info == 0 then
  125.             serverstick = true
  126.             stickSound.Playing = true
  127.             local selection_box = Instance.new("SelectionBox")
  128.             selection_box.Adornee = spawn_location
  129.             selection_box.Name = "someoutlinedunno"
  130.             selection_box.Visible = false
  131.             selection_box.Parent = spawn_location
  132.             selection_box.SurfaceTransparency = 1
  133.             selection_box.LineThickness = 0.03
  134.         else
  135.             serverstick = false
  136.             stickSound.Playing = true
  137.             datyper:FindFirstChild("someoutlinedunno"):Destroy()
  138.         end
  139.     end)
  140. end
  141.  
  142.  
  143. NLS([[
  144.  
  145. local args={...}
  146. local stick = 0
  147. local thepart = args[2]
  148. local typer = args[2].SurfaceGui.ScrollingFrame.typer
  149. local typerServer = args[2].SurfaceGui.ScrollingFrame.typerServer
  150. typer.Visible = true
  151. typerServer.Visible = false
  152. typer:GetPropertyChangedSignal("Text"):Connect(function()
  153.     local repStore = game:GetService("ReplicatedStorage")
  154.     repStore:FindFirstChild(args[1].."typerRemote"):FireServer(typer.Text)
  155. end)
  156.  
  157. local userInputService = game:GetService("UserInputService")
  158. userInputService.InputBegan:Connect(function(input, gameProcessedEvent)
  159.     if input.UserInputType ~= Enum.UserInputType.Keyboard then return end
  160.     if input.KeyCode ~= Enum.KeyCode.Q then return end
  161.  
  162.     local repStore = game:GetService("ReplicatedStorage")
  163.     if stick == 0 then
  164.         repStore:FindFirstChild(args[1].."stickRemote"):FireServer(stick)
  165.         stick = 1
  166.     else
  167.         repStore:FindFirstChild(args[1].."stickRemote"):FireServer(stick)
  168.         stick = 0
  169.     end
  170.    
  171.  
  172. end)]], owner.PlayerGui, owner.Name, script:FindFirstChild(owner.Name.."-datyper"))
  173.  
  174. local charToLookAt = owner.Character
  175. local offset = Vector3.new(0, 5, -5) -- in your case, Vector3.new(0,0,5), or something like that
  176.  
  177. owner.Chatted:Connect(function(lol)
  178.     if lol == "/e end" then
  179.         game:GetService("ReplicatedStorage"):FindFirstChild(owner.Name.."typerRemote"):Destroy()
  180.         game:GetService("ReplicatedStorage"):FindFirstChild(owner.Name.."stickRemote"):Destroy()
  181.         workspace:FindFirstChild(owner.Name.."-datyper"):Destroy()
  182.         script:Destroy()
  183.     end
  184. end)
  185.  
  186. game:GetService("RunService").PostSimulation:Connect(function(dt)
  187.     --datyper.CFrame = CFrame.lookAt(datyper.Position, charToLookAt.HumanoidRootPart.Position)
  188.     --datyper.CFrame = charToLookAt.HumanoidRootPart.CFrame*CFrame.new(offset) -- should offset while keeping rotations of root.CFrame
  189.     if not serverstick then
  190.         datyper.CFrame = datyper.CFrame:Lerp(owner.Character.HumanoidRootPart.CFrame*CFrame.new(offset), .1)
  191.     end
  192. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement