Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local UserInputService = game:GetService("UserInputService")
- local function KollisionToggler()
- local MouseTarget = game.Players.LocalPlayer:GetMouse().Target
- MouseTarget.CanCollide = not MouseTarget.CanCollide
- if MouseTarget.CanCollide then
- MouseTarget.Transparency = 0
- else
- MouseTarget.Transparency = 0.7
- end
- end
- UserInputService.InputBegan:Connect(function(Key, Typing)
- if not Typing then
- local key = Key.KeyCode.Name
- if key == "K" then
- KollisionToggler()
- end
- end
- end)
- local function createNotification(message)
- local Notification = Instance.new("ScreenGui")
- Notification.Name = "Notification"
- Notification.Parent = game.Players.LocalPlayer.PlayerGui
- local Frame = Instance.new("Frame")
- Frame.Size = UDim2.new(0, 0, 0, 0)
- Frame.Position = UDim2.new(0.5, -100, 0, 10)
- Frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- Frame.BorderSizePixel = 0
- Frame.Parent = Notification
- local TextLabel = Instance.new("TextLabel")
- TextLabel.Size = UDim2.new(1, 0, 1, 0)
- TextLabel.BackgroundTransparency = 1
- TextLabel.Text = message
- TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
- TextLabel.TextSize = 20
- TextLabel.Parent = Frame
- wait(5)
- Notification:Destroy()
- end
- createNotification("Press K to toggle kollision")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement