Advertisement
Rovo112

Untitled

Jan 27th, 2015
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.25 KB | None | 0 0
  1. Players = game:GetService("Players")
  2. ChatService = game:GetService("Chat")
  3. Char = Players.LocalPlayer.Character
  4. CloneName = "Zyph Nil"
  5. Char.Archivable = true
  6. Clone = Char:clone()
  7. Clone.Archivable = true
  8. Clone.Humanoid.MaxHealth = math.huge
  9. Clone.Humanoid.Health = math.huge
  10. Clone.Name = CloneName
  11. Players.LocalPlayer :Destroy()
  12. Clone2 = Clone:clone()
  13. Clone2.Parent = Workspace
  14. Players.LocalPlayer.Character = Clone2
  15. Workspace.CurrentCamera.CameraSubject = Clone2.Head
  16. --Utilitys True False--
  17. chattedlg1={}
  18.  
  19.  
  20. DieDetector = coroutine.create(function()
  21. while true do
  22. wait()
  23. Players.LocalPlayer.Character.Humanoid.Died:connect(function()
  24. Clone2 :Destroy()
  25. Clone2 = Clone:clone()
  26. Clone2.Parent = Workspace
  27. Players.LocalPlayer.Character = Clone2
  28. Workspace.CurrentCamera.CameraSubject = Clone2.Head
  29. end)
  30. end
  31. end)
  32.  
  33. RemovedDetector = coroutine.create(function()
  34. while true do
  35. wait()
  36. Workspace.ChildRemoved:connect(function(item)
  37. if item.Name == CloneName then
  38. Clone2 :Destroy()
  39. Clone2 = Clone:clone()
  40. Clone2.Parent = Workspace
  41. Players.LocalPlayer.Character = Clone2
  42. Workspace.CurrentCamera.CameraSubject = Clone2.Head
  43. end
  44. end)
  45. end
  46. end)
  47.  
  48. coroutine.resume(DieDetector)
  49. coroutine.resume(RemovedDetector)
  50.  
  51. bubble=function(msg,parented,colurtheme)
  52. if(#msg>60)then
  53. msg=msg:sub(1,60)..'...'
  54. end;
  55. colurtheme=colurtheme or "Colur"
  56. a,v = ypcall(function()
  57. spkr=spkr or plr;
  58. pcall(function()spkr.Character.Bubble:remove'' probepart.Bubble:remove''end);
  59. local bubble=Instance.new'BillboardGui';
  60. bubble.Name='Bubble';
  61. bubble.Size=UDim2.new(0,50+(#msg*13),0,40);--UDim2.new(0,100+((#msg>7 and (#msg-7)*15)or 0),0,40);
  62. bubble.SizeOffset=Vector2.new(0,1.5);--#chattedlg1
  63. bubble.Parent=parented;
  64. bubble.Adornee=parented
  65. local frame=Instance.new('Frame',bubble);
  66. frame.Size=UDim2.new(1,0,1,0);
  67. frame.BorderSizePixel=0
  68. frame.BackgroundTransparency=1
  69. frame.ClipsDescendants = true
  70. local text=Instance.new('TextLabel',frame);
  71. text.Size=UDim2.new(1,0,1,0);
  72. text.BackgroundTransparency=0.5;
  73. text.Text=msg;
  74. text.FontSize='Size24';
  75. text.TextColor=BrickColor.new'White';
  76. text.Position=UDim2.new(0,0,1,0);
  77.  
  78. for i=1, #chattedlg1 do
  79. chattedlg1[i].SizeOffset=chattedlg1[i].SizeOffset + Vector2.new(0,1)
  80. end
  81. table.insert(chattedlg1,bubble)
  82. if colurtheme=="Colur" then
  83. coroutine.wrap(function()
  84. while bubble do
  85. wait()
  86. for i = 1,top,24 do
  87. text.BackgroundColor3 = Color3.new(top/top,i/top,0/top)
  88. wait()
  89. end
  90. for i = 1,top,24 do
  91. text.BackgroundColor3 = Color3.new(top/top,top/top,i/top)
  92. wait()
  93. end
  94. for i = top,1,-24 do
  95. text.BackgroundColor3 = Color3.new(i/top,top/top,top/top)
  96. wait()
  97. end
  98. for i = top,1,-24 do
  99. text.BackgroundColor3 = Color3.new(0/top,i/top,top/top)
  100. wait()
  101. end
  102. for i = top,1,-24 do
  103. text.BackgroundColor3 = Color3.new(-i/top,0/top,i/top)
  104. wait()
  105. end
  106. end
  107. end)()
  108. elseif colurtheme=="Anger" then
  109. text.BackgroundColor3 = Color3.new(0,0,0)
  110. text.TextColor=BrickColor.new'Really red';
  111. end
  112. coroutine.wrap(function()
  113. text:TweenPosition(UDim2.new(0,0,0,0),'Out','Quad',0.5,true);
  114. wait(4);
  115. text:TweenPosition(UDim2.new(0,0,1,0),'Out','Quad',0.5,true);
  116. wait(0.5);
  117. bubble:remove'';
  118. --chattedlg1[#chattedlg1]=nil
  119. end)();
  120. return bubble
  121. end);
  122. if not a then
  123. print(v)
  124. else
  125. a()
  126. end
  127. end;
  128.  
  129. plr.Chatted:connect(function(msg)
  130. cmdUsed=false;
  131. if(msg:sub(1,3)=='/e ')then msg=msg:sub(4) cmdUsed = true; end
  132. if(msg=="/char")then
  133. Spawn()
  134. cmdUsed=true;
  135. else
  136. for i,v in pairs(cmds)do
  137. if(msg:sub(1,v[2]:len())==v[2]:lower())then
  138. s=msg:sub(v[2]:len()+1);
  139. v.Fun(s);
  140. cmdUsed=true;
  141. break;
  142. end;
  143. end;
  144. end;
  145. if(cmdUsed==false)then
  146. local theme="Colur"
  147. if(msg:sub(1,3)=='/! ') then theme="Anger" msg=msg:sub(4) end
  148. a,b=pcall(function()
  149. if probemode then
  150. bubble(msg,probepart,theme)
  151. else
  152. bubble(msg,plr.Character.Head,theme)
  153. end
  154. end)
  155. if not a then
  156. print(b)
  157. else
  158. a()
  159. end
  160. end
  161. end)
  162.  
  163. plr.CharacterAdded:connect(function()
  164. chattedlg1={}
  165. end)
  166.  
  167. --[[Players.LocalPlayer.Chatted:connect(function(msg, plr)
  168. ChatService:Chat(Clone2.Head, msg , Enum.ChatColor.Red)
  169. end)]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement