Advertisement
Guest User

orbnarb

a guest
Dec 17th, 2014
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.54 KB | None | 0 0
  1. Creator = 'aceahmedmoh'
  2. Player = game.Players[Creator]
  3. Char = Player.Character
  4. local chat = game:GetService("Chat")
  5.  
  6. Bet = ";"
  7.  
  8.  
  9.  
  10. Orb = Instance.new("Part")
  11. Orb.Parent = game.Workspace
  12. Orb.Shape = "Ball"
  13. Orb.Transparency = .5
  14. Orb.Size = Vector3.new(1,1,1)
  15. Orb.Material = "SmoothPlastic"
  16. Orb.BottomSurface='Smooth'
  17. Orb.BrickColor = BrickColor.new("Really black")
  18. Orb.Name = "Orb"
  19. Orb.CanCollide = false
  20.  
  21.  
  22.  
  23. local Loop = coroutine.wrap(function()
  24.         while wait() do
  25. Orb.CFrame=Char.Head.CFrame*CFrame.new(-2,0,0)
  26.         end
  27. end)
  28. Loop()
  29.  
  30. fc = function(n)
  31.     for i,v in pairs(game.Players:children()) do
  32.         if v.Name:lower():sub(1,#n) == n then
  33.             return v.Character or v.CharacterAdded:wait()
  34.         end
  35.     end
  36. end
  37.  
  38.  
  39.  
  40. function onChatted(msg, plr)
  41.    
  42.         if (plr.Name == Creator) then
  43.         chat:Chat(Orb,msg, "Blue")            
  44.     end
  45.         if(plr.Name==Creator)then      
  46.                 if(msg:lower():sub(1,1+Bet:len())=='m'..Bet:lower())then
  47.                         local rest=msg:sub(1+Bet:len()+1,#msg);
  48.                         local Msg=Instance.new('Message',workspace);
  49.                                 Msg.Text=rest;
  50.                                 game:service'Debris':addItem(Msg,5);
  51.                                 print'a';
  52.  
  53.  
  54. elseif(msg:lower():sub(1,1+Bet:len())=='h'..Bet:lower())then
  55.                         local rest=msg:sub(1+Bet:len()+1,#msg);
  56.                         local Hint=Instance.new('Hint',workspace);
  57.                                 Hint.Text=rest;
  58.                                 wait(5)
  59.                                                                 Hint:Destroy()
  60.                                 print'b';
  61. end
  62.  
  63.  
  64. if msg:lower():sub(1,4+Bet:len()) == 'kill'..Bet:lower() then
  65.                                         local tokill = fc(msg:lower():sub(4+Bet:len()+1))
  66.                                         if tokill then tokill:BreakJoints() end
  67.  
  68. elseif(msg:lower():sub(1,3+Bet:len())=='mes'..Bet:lower())then
  69.                                                 local rest=msg:sub(3+Bet:len()+1,#msg);
  70.                                                 for _,v in next, game:service'Players':players()do
  71.                                                         Spawn(function() -- new thread, same as coroutine.wrap shorter thou
  72.                                                                 local MsgGUI = Instance.new("ScreenGui")
  73.                                                                 local MsgBox = Instance.new("TextLabel")
  74.                                                                 local FrameMsg = Instance.new("Frame")FrameMsg.Name = "FrameMsg" FrameMsg.BackgroundColor3 = Color3.new(0,0,0) FrameMsg.BorderSizePixel = 0 FrameMsg.BackgroundTransparency = 1 FrameMsg.Size = UDim2.new(10,0,10,0) FrameMsg.Position = UDim2.new(-5,0,-5,0) FrameMsg.ZIndex = 8
  75.                                                                 MsgGUI.Parent = v:findFirstChild'PlayerGui';
  76.                                                                 MsgBox.Parent = FrameMsg
  77.                                                                 MsgBox.Text = rest
  78.                                                                 MsgBox.Font = "Arial"
  79.                                                                 MsgBox.BackgroundColor3 = Color3.new(120, 120, 120)
  80.                                                                 MsgBox.Transparency = .5
  81.                                                                 MsgBox.BorderColor3 = Color3.new(27, 42, 53)
  82.                                                                 MsgBox.Size = UDim2.new(0.05, 0, 0.05, 0)
  83.                                                                 MsgBox.Position = UDim2.new(-.25, 0, .25, 0)
  84.                                                                 MsgBox:TweenSizeAndPosition(UDim2.new(.5, 0, .5, 0), UDim2.new(.25, 0, .25, 0), "Out", "Quad", 2);
  85.                                                                 wait(5);--Change to fix delay
  86.                                                                 MsgBox:TweenSizeAndPosition(UDim2.new(0,0,0,0),UDim2.new(1.5,0,.25,0),'Out','Quad',2);
  87.                                                                 wait(2);
  88.                                                                 MsgGUI:Destroy();
  89.                                                         end);--End that thread
  90.                                                 end;
  91.                                                
  92.                                                
  93. end
  94.         end
  95.                 end
  96.  
  97.  
  98.  
  99. Player.Chatted:connect(function(msg)
  100.         onChatted(msg, Player)
  101. end)
  102. game.Players.PlayerAdded:connect(function(player)
  103.     player.Chatted:connect(function(message) onChatted(message, player) end)
  104. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement