Advertisement
CloneTrooper1019

Terrible Selection Based Dialog Sequence Thing

Mar 27th, 2014
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.68 KB | None | 0 0
  1. game.Selection.SelectionChanged:connect(function ()
  2.     local object = game.Selection:Get()[1]
  3.     if object then
  4.         if object:IsA("BindableEvent") then
  5.             game:GetService("Chat"):Chat(workspace.Player1.Torso,"(Firing Event: "..object.Name..")","Green")
  6.             object:Fire()
  7.         elseif object:IsA("BindableFunction") then
  8.             game:GetService("Chat"):Chat(workspace.Player1.Torso,"(Invoking Function: "..object.Name..")","Green")
  9.             object:Invoke()
  10.         elseif object:IsA("Accoutrement") then
  11.             game:GetService("Chat"):Chat(workspace.Player1.Torso,object.Name,"Blue")
  12.         elseif object:IsA("BoolValue") then
  13.             game:GetService("Chat"):Chat(workspace.Player1.Torso,"Collecting Loot","Blue")
  14.         end
  15.     end
  16. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement