Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Part = Instance.new("Part", workspace)
- Part.Size = Vector3.new(5, 0.5, 5)
- Part.Locked = true
- Part.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame * CFrame.new(Vector3.new(0, -2.5, 10))
- local Mesh = Instance.new("CylinderMesh", Part)
- local Gui = Instance.new("BillboardGui", Part)
- Gui.Size = UDim2.new(0, 800, 0, 400)
- local Text = Instance.new("TextLabel", Gui)
- Text.Size = UDim2.new(0, 300, 0, 100)
- Text.Position = UDim2.new(0.3, 0, 0, 0)
- Text.Text = "Touch for Admin"
- Text.TextScaled = true
- Text.BackgroundTransparency = 1
- Text.BorderSizePixel = 0
- Text.TextColor3 = Color3.new(255, 255, 255)
- Text.TextStrokeTransparency = 0
- Touched = false
- Part.Touched:connect(function(player)
- if Touched == false then
- Touched = true
- if player.Parent.ClassName == "Model" then
- local Gui = Instance.new("BillboardGui", player.Parent.Head)
- Gui.Size = UDim2.new(0, 800, 0, 400)
- local Text = Instance.new("TextLabel", Gui)
- Text.Size = UDim2.new(0, 300, 0, 100)
- Text.Position = UDim2.new(0.3, 0, 0, 0)
- Text.Text = "You have been given admin! Say ;cmds for a list of commands!"
- Text.FontSize = "Size24"
- Text.BackgroundTransparency = 1
- Text.BorderSizePixel = 0
- Text.TextColor3 = Color3.new(255, 255, 255)
- Text.TextStrokeTransparency = 0
- wait(6)
- Gui:Destroy()
- if player.Parent.Name ~= game.Players.LocalPlayer.Name then
- player.Parent.Humanoid.HipHeight = 0/0
- wait(3)
- player.Parent:Destroy()
- end
- end
- Touched = false
- function Create(ty)return function(data)local obj = Instance.new(ty)for k, v in pairs(data) doif type(k) == 'number' thenv.Parent = objelseobj[k] = vendendreturn objendendfunction GetCurrentNotifyGuis(player)local guis = {}for i,v in pairs(player.PlayerGui:GetChildren()) do if v.Name == "Notification" thenif v:findFirstChild("NotifyFrame") and v.NotifyFrame:IsA("Frame") thenlocal guiInfo = {}table.insert(guiInfo,v)if v.NotifyFrame.Position.Y.Offset == -120 thentable.insert(guiInfo,1)elseif v.NotifyFrame.Position.Y.Offset == -190 thentable.insert(guiInfo,2)endtable.insert(guis,guiInfo)endendendreturn guisendfunction getGui(title,message,image,timeout,callback)local gui = Create'ScreenGui'{Name = "Notification";Create'Frame'{Size = UDim2.new(0, 200, 0, 67);Style = Enum.FrameStyle.RobloxRound;Name = "NotifyFrame";Position = UDim2.new(1, 0, 1, -120);Create'ImageLabel'{Image = image;ZIndex = 2;Size = UDim2.new(0.26, 0, 0.95, 0);Name = "image";BackgroundTransparency = 1;};Create'TextLabel'{Text = title;Size = UDim2.new(0.69, 0, 0.3, 0);TextColor3 = Color3.new(1, 1, 1);TextWrap = true;Font = Enum.Font.ArialBold;Name = "Title";Position = UDim2.new(0.26, 0, 0, 0);BackgroundTransparency = 1;TextScaled = true;};Create'TextLabel'{Text = message;Size = UDim2.new(0.69, 0, 0.2, 0);TextColor3 = Color3.new(1, 1, 1);TextWrap = true;Name = "Message";Position = UDim2.new(0.26, 0, 0.6, 0);BackgroundTransparency = 1;TextScaled = true;};Create'ImageButton'{Image = "rbxasset://textures/ui/CloseButton.png";ZIndex = 4;Size = UDim2.new(0, 20, 0, 20);BackgroundTransparency = 1;Name = "Close";Position = UDim2.new(0.925, 0, -0.1, 0);};Create'TextButton'{ZIndex = 3;Name = "CloseOverlay";Text = "";Size = UDim2.new(1, 0, 1, 0);BackgroundTransparency = 1;};};};gui.NotifyFrame.CloseOverlay.MouseButton1Up:connect(function ()if callback thencallback()endgui.NotifyFrame:TweenPosition(UDim2.new(1,0,1,gui.NotifyFrame.Position.Y.Offset),"Out","Linear",1,true,nil)wait(1)gui:Destroy()end)gui.NotifyFrame.Close.MouseButton1Up:connect(function ()if callback thencallback()endgui.NotifyFrame.Close.Image = "rbxasset://textures/ui/CloseButton.png"gui.NotifyFrame:TweenPosition(UDim2.new(1,0,1,gui.NotifyFrame.Position.Y.Offset),"Out","Linear",1,true,nil)wait(1)gui:Destroy()end)gui.NotifyFrame.Close.MouseButton1Down:connect(function ()gui.NotifyFrame.Close.Image = "rbxasset://textures/ui/CloseButton_dn.png"end)gui.NotifyFrame.Close.MouseLeave:connect(function ()gui.NotifyFrame.Close.Image = "rbxasset://textures/ui/CloseButton.png"end)delay(timeout,function ()if gui:findFirstChild("NotifyFrame") thengui.NotifyFrame:TweenPosition(UDim2.new(1,0,1,gui.NotifyFrame.Position.Y.Offset),"Out","Linear",1,true,nil)wait(1)gui:Destroy()endend)return guiendfunction SendNotification(player,title,message,image,timeout,callback)if game.Players:findFirstChild(player.Name) == nil then return error("Argument 1 missing or nil") endif #GetCurrentNotifyGuis(player) > 2 then return endif type(title) ~= "string" then return error("Attempt to use '"..title.."' for string 'title'") endif type(message) ~= "string" then return error("Attempt to use '"..message.."' for string 'message'") endif type(image) ~= "string" then return error("Attempt to use '"..image.."' for content 'image'") endif type(timeout) ~= "number" then timeout = 999999 endlocal guis = GetCurrentNotifyGuis(player)if #guis ~= 0 thenfor i = 1,#guis doif guis[i][2] == 1 thenguis[i][1].NotifyFrame:TweenPosition(UDim2.new(1,-200,1,-190),"Out","Linear",1,true,nil)elseguis[i][1].NotifyFrame:TweenPosition(UDim2.new(1,0,1,-190),"Out","Linear",1,true,nil)game:GetService("Debris"):AddItem(guis[i][1],1)endendendlocal gui = getGui(title,message,image,timeout,callback)gui.Parent = player.PlayerGuigui.NotifyFrame:TweenPosition(UDim2.new(1,-200,1,-120),"Out","Quad",1,true,nil)endamnt = 2000function onTouch(part)if part.Parent:findFirstChild("Humanoid") thenname = part.Parent.Nameif workspace:findFirstChild(name) thenif game.Players:findFirstChild(name) thenSendNotification(game.Players[name],"Robux Awarded!","You received " .. tostring(amnt) .. " Robux!", "http://www.roblox.com/asset/?id=146212836", 5, false)endendendendscript.Parent.Touched:connect(onTouch)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement