Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("bobtyper v1.2 made by daredjumper (bobby)")
- local serverstick = false
- local datyper = Instance.new("Part")
- datyper.BottomSurface = Enum.SurfaceType.Smooth
- datyper.BrickColor = BrickColor.new(0.38823533058166504, 0.37254902720451355, 0.38431376218795776)
- 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))
- datyper.Color = Color3.new(0.388235, 0.372549, 0.384314)
- datyper.Orientation = Vector3.new(5, 0, 0)
- datyper.Rotation = Vector3.new(5, 0, 0)
- datyper.Size = Vector3.new(16.75, 11.25, 0.44999992847442627)
- datyper.TopSurface = Enum.SurfaceType.Smooth
- datyper.Name = owner.Name.."-datyper"
- datyper.Parent = script
- datyper.Anchored = true
- datyper.Transparency = .7
- datyper.CanCollide = false
- local surface_gui = Instance.new("SurfaceGui")
- surface_gui.ClipsDescendants = true
- surface_gui.LightInfluence = 1
- surface_gui.MaxDistance = 1000
- surface_gui.SizingMode = Enum.SurfaceGuiSizingMode.PixelsPerStud
- surface_gui.Face = Enum.NormalId.Back
- surface_gui.ResetOnSpawn = true
- surface_gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- surface_gui.Parent = datyper
- surface_gui.LightInfluence = 0
- local scrolling_frame = Instance.new("ScrollingFrame")
- scrolling_frame.CanvasSize = UDim2.new(0, 0, 234, 0)
- scrolling_frame.ScrollBarImageColor3 = Color3.new(0, 0, 0)
- scrolling_frame.Active = true
- scrolling_frame.BackgroundColor3 = Color3.new(1, 1, 1)
- scrolling_frame.BorderColor3 = Color3.new(0, 0, 0)
- scrolling_frame.BorderSizePixel = 0
- scrolling_frame.Size = UDim2.new(1, 0, 1, 0)
- scrolling_frame.Visible = true
- scrolling_frame.Parent = surface_gui
- local typer = Instance.new("TextBox")
- typer.CursorPosition = -1
- typer.Font = Enum.Font.Code
- typer.MultiLine = true
- typer.PlaceholderText = "type here i guess"
- typer.Text = ""
- typer.TextColor3 = Color3.new(1, 1, 1)
- typer.TextSize = 21
- typer.TextWrapped = true
- typer.TextXAlignment = Enum.TextXAlignment.Left
- typer.TextYAlignment = Enum.TextYAlignment.Top
- typer.BackgroundColor3 = Color3.new(0.105882, 0.105882, 0.105882)
- typer.BorderColor3 = Color3.new(0, 0, 0)
- typer.BorderSizePixel = 0
- typer.Size = UDim2.new(1, 0, 1, 0)
- typer.Visible = true
- typer.Name = "typer"
- typer.Parent = scrolling_frame
- typer.ClearTextOnFocus = false
- typer.Visible = false
- local typerServer = Instance.new("TextBox")
- typerServer.TextEditable = false
- typerServer.Font = Enum.Font.Code
- --typerServer.MultiLine = true
- --typerServer.PlaceholderText = "type here i guess"
- typerServer.Text = ""
- typerServer.TextColor3 = Color3.new(1, 1, 1)
- typerServer.TextSize = 21
- typerServer.TextWrapped = true
- typerServer.TextXAlignment = Enum.TextXAlignment.Left
- typerServer.TextYAlignment = Enum.TextYAlignment.Top
- typerServer.BackgroundColor3 = Color3.new(0.105882, 0.105882, 0.105882)
- typerServer.BorderColor3 = Color3.new(0, 0, 0)
- typerServer.BorderSizePixel = 0
- typerServer.Size = UDim2.new(1, 0, 1, 0)
- typerServer.Visible = true
- typerServer.Name = "typerServer"
- typerServer.Parent = scrolling_frame
- typerServer.ClearTextOnFocus = false
- --typerServer.ClearTextOnFocus = false
- local stickSound = Instance.new("Sound", datyper)
- stickSound.Volume = 4
- stickSound.Name = "stickSound"
- stickSound.SoundId = "rbxassetid://12221967"
- if not game:GetService("ReplicatedStorage"):FindFirstChild(owner.Name.."typerRemote") then
- local typerRemote = Instance.new("RemoteEvent", game:GetService("ReplicatedStorage"))
- typerRemote.Name = owner.Name.."typerRemote"
- typerRemote.OnServerEvent:Connect(function(plr, text)
- typerServer.Text = text
- end)
- else
- game:GetService("ReplicatedStorage"):FindFirstChild(owner.Name.."typerRemote").OnServerEvent:Connect(function(plr, text)
- typerServer.Text = text
- end)
- end
- if not game:GetService("ReplicatedStorage"):FindFirstChild(owner.Name.."stickRemote") then
- local stickRemote = Instance.new("RemoteEvent", game:GetService("ReplicatedStorage"))
- stickRemote.Name = owner.Name.."stickRemote"
- stickRemote.OnServerEvent:Connect(function(plr, info)
- if info == 0 then
- serverstick = true
- stickSound.Playing = true
- local selection_box = Instance.new("SelectionBox", datyper)
- selection_box.Adornee = datyper
- selection_box.Name = "someoutlinedunno"
- selection_box.Visible = true
- selection_box.Color3 = Color3.fromRGB(13, 105, 172)
- else
- serverstick = false
- stickSound.Playing = true
- datyper:FindFirstChild("someoutlinedunno"):Destroy()
- end
- end)
- else
- game:GetService("ReplicatedStorage"):FindFirstChild(owner.Name.."stickRemote").OnServerEvent:Connect(function(plr, info)
- if info == 0 then
- serverstick = true
- stickSound.Playing = true
- local selection_box = Instance.new("SelectionBox")
- selection_box.Adornee = spawn_location
- selection_box.Name = "someoutlinedunno"
- selection_box.Visible = false
- selection_box.Parent = spawn_location
- selection_box.SurfaceTransparency = 1
- selection_box.LineThickness = 0.03
- else
- serverstick = false
- stickSound.Playing = true
- datyper:FindFirstChild("someoutlinedunno"):Destroy()
- end
- end)
- end
- NLS([[
- local args={...}
- local stick = 0
- local thepart = args[2]
- local typer = args[2].SurfaceGui.ScrollingFrame.typer
- local typerServer = args[2].SurfaceGui.ScrollingFrame.typerServer
- typer.Visible = true
- typerServer.Visible = false
- typer:GetPropertyChangedSignal("Text"):Connect(function()
- local repStore = game:GetService("ReplicatedStorage")
- repStore:FindFirstChild(args[1].."typerRemote"):FireServer(typer.Text)
- end)
- local userInputService = game:GetService("UserInputService")
- userInputService.InputBegan:Connect(function(input, gameProcessedEvent)
- if input.UserInputType ~= Enum.UserInputType.Keyboard then return end
- if input.KeyCode ~= Enum.KeyCode.Q then return end
- local repStore = game:GetService("ReplicatedStorage")
- if stick == 0 then
- repStore:FindFirstChild(args[1].."stickRemote"):FireServer(stick)
- stick = 1
- else
- repStore:FindFirstChild(args[1].."stickRemote"):FireServer(stick)
- stick = 0
- end
- end)]], owner.PlayerGui, owner.Name, script:FindFirstChild(owner.Name.."-datyper"))
- local charToLookAt = owner.Character
- local offset = Vector3.new(0, 5, -5) -- in your case, Vector3.new(0,0,5), or something like that
- owner.Chatted:Connect(function(lol)
- if lol == "/e end" then
- game:GetService("ReplicatedStorage"):FindFirstChild(owner.Name.."typerRemote"):Destroy()
- game:GetService("ReplicatedStorage"):FindFirstChild(owner.Name.."stickRemote"):Destroy()
- workspace:FindFirstChild(owner.Name.."-datyper"):Destroy()
- script:Destroy()
- end
- end)
- game:GetService("RunService").PostSimulation:Connect(function(dt)
- --datyper.CFrame = CFrame.lookAt(datyper.Position, charToLookAt.HumanoidRootPart.Position)
- --datyper.CFrame = charToLookAt.HumanoidRootPart.CFrame*CFrame.new(offset) -- should offset while keeping rotations of root.CFrame
- if not serverstick then
- datyper.CFrame = datyper.CFrame:Lerp(owner.Character.HumanoidRootPart.CFrame*CFrame.new(offset), .1)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement