Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local UserInputService = game:GetService("UserInputService")
- -- القائمة
- local menu = Instance.new("ScreenGui")
- local button = Instance.new("TextButton")
- button.Text = "اضغط هنا للإختفاء/الظهور"
- button.Size = UDim2.new(0, 200, 0, 50)
- button.BackgroundColor3 = Color3.new(0, 0, 0) -- اللون الأسود
- button.Parent = menu
- menu.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- -- kkkkkkkkkkkkkkkkkkkkkkk
- local dragging
- local dragInput
- local dragStart
- local startPos
- local function update(input)
- local delta = input.Position - dragStart
- menu.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- menu.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- dragging = true
- dragStart = input.Position
- startPos = menu.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- menu.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
- dragInput = input
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if input == dragInput and dragging then
- update(input)
- end
- end)
- -- k
- local invisible = false
- button.MouseButton1Click:Connect(function()
- invisible = not invisible
- for _, part in ipairs(game.Players.LocalPlayer.Character:GetDescendants()) do
- if part:IsA("BasePart") then
- part.Transparency = invisible and 1 or 0
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement