Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- part1 = Instance.new("Part", script)
- part1.Size = Vector3.new(10,10,1)
- part1.Anchored = true
- part1.CFrame = owner.Character.HumanoidRootPart.CFrame
- local result = workspace:Raycast(owner.Character.HumanoidRootPart.Position + owner.Character.HumanoidRootPart.CFrame.upVector * 2.125,owner.Character.HumanoidRootPart.CFrame.upVector * -500)
- if result then
- part1.Position = result.Position
- end
- local screengui = Instance.new("SurfaceGui", part1)
- screengui.Name = "Textlol2"
- screengui.Face = Enum.NormalId.Front
- Gui2 = Instance.new("Frame",screengui)
- Gui2.BackgroundColor3 = BrickColor.new("Really black").Color
- Gui2.Size = UDim2.new(0.75, 0, 0.75, 0)
- Gui2.BorderColor3 = BrickColor.new("Institutional white").Color
- Gui2.BorderSizePixel = 5
- Gui1 = Instance.new("Frame",screengui)
- Gui1.BackgroundColor3 = Color3.fromRGB(255,0,0)
- Gui1.Size = UDim2.new(0.0625, 0, 0.0625, 0)
- local object = Instance.new("ObjectValue", owner.PlayerGui)
- object.Value = Gui1
- object.Name = 'BLOCK'
- local object2 = Instance.new("ObjectValue", owner.PlayerGui)
- object2.Value = Gui2
- object2.Name = 'BLOCK2'
- Gui2.AnchorPoint = Vector2.new(0.5, 0.5)
- Gui2.Position = UDim2.new(0.5, 0, 0.5, 0)
- Gui1.AnchorPoint = Vector2.new(0.5, 0.5)
- Gui1.Position = UDim2.new(0.5, 0, 0.5, 0)
- local mr = Instance.new("RemoteEvent",part1)
- local object3 = Instance.new("ObjectValue", owner.PlayerGui)
- object3.Value = mr
- object3.Name = 'REMOTE'
- NLS([[
- local mouse = owner:GetMouse()
- local uis = game:GetService("UserInputService")
- local block = owner.PlayerGui.BLOCK.Value
- local block2 = owner.PlayerGui.BLOCK2.Value
- local remote = owner.PlayerGui.REMOTE.Value
- wait()
- coroutine.wrap(function()
- game:GetService("RunService").RenderStepped:Connect(function()
- if uis:IsKeyDown(Enum.KeyCode.T) then
- remote:FireServer(block.Position + UDim2.new(0,0,0,-0.035))
- wait(0.075)
- elseif uis:IsKeyDown(Enum.KeyCode.G) then
- remote:FireServer(block.Position + UDim2.new(0,0,0,0.035))
- wait(0.075)
- elseif uis:IsKeyDown(Enum.KeyCode.F) then
- remote:FireServer(block.Position + UDim2.new(0,-0.035,0,0))
- wait(0.075)
- elseif uis:IsKeyDown(Enum.KeyCode.H) then
- remote:FireServer(block.Position + UDim2.new(0,0.035,0,0))
- wait(0.075)
- end
- end)
- end)()
- ]], owner.PlayerGui)
- local tween
- coroutine.wrap(function()
- mr.OnServerEvent:Connect(function(plr,pos)
- local tweenService = game:GetService("TweenService")
- local timeToFade = 0.075
- local object = Gui1
- local tweenInfo = TweenInfo.new(timeToFade)
- local goal = {}
- goal.Position = pos
- tween = tweenService:Create(object, tweenInfo, goal)
- tween:Play()
- local relativePostion = Gui1.AbsolutePosition - Gui2.AbsolutePosition
- local clampedX = math.clamp(relativePostion.X, 0, Gui2.AbsoluteSize.X)
- local clampedY = math.clamp(relativePostion.Y, 0, Gui2.AbsoluteSize.Y)
- Gui1.Position = UDim2.new(0,clampedX,0,clampedY) + Gui2.Position
- end)
- end)()
Add Comment
Please, Sign In to add comment