Advertisement
jayrock3401

Untitled

Dec 23rd, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.63 KB | None | 0 0
  1.  
  2. -- This script has been converted to FE by iPxter
  3.  
  4.  
  5. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  6. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  7. do
  8. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  9. script.Parent = Player.Character
  10.  
  11. --RemoteEvent for communicating
  12. local Event = Instance.new("RemoteEvent")
  13. Event.Name = "UserInput_Event"
  14.  
  15. --Fake event to make stuff like Mouse.KeyDown work
  16. local function fakeEvent()
  17. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  18. t.connect = t.Connect
  19. return t
  20. end
  21.  
  22. --Creating fake input objects with fake variables
  23. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  24. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  25. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  26. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  27. end}
  28. --Merged 2 functions into one by checking amount of arguments
  29. CAS.UnbindAction = CAS.BindAction
  30.  
  31. --This function will trigger the events that have been :Connect()'ed
  32. local function te(self,ev,...)
  33. local t = m[ev]
  34. if t and t._fakeEvent and t.Function then
  35. t.Function(...)
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=Player then return end
  43. if io.isMouse then
  44. m.Target = io.Target
  45. m.Hit = io.Hit
  46. else
  47. local b = io.UserInputState == Enum.UserInputState.Begin
  48. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  49. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  50. end
  51. for _,t in pairs(CAS.Actions) do
  52. for _,k in pairs(t.Keys) do
  53. if k==io.KeyCode then
  54. t.Function(t.Name,io.UserInputState,io)
  55. end
  56. end
  57. end
  58. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  59. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  60. end
  61. end)
  62. Event.Parent = NLS([==[
  63. local Player = game:GetService("Players").LocalPlayer
  64. local Event = script:WaitForChild("UserInput_Event")
  65.  
  66. local UIS = game:GetService("UserInputService")
  67. local input = function(io,a)
  68. if a then return end
  69. --Since InputObject is a client-side instance, we create and pass table instead
  70. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  71. end
  72. UIS.InputBegan:Connect(input)
  73. UIS.InputEnded:Connect(input)
  74.  
  75. local Mouse = Player:GetMouse()
  76. local h,t
  77. --Give the server mouse data 30 times every second, but only if the values changed
  78. --If player is not moving their mouse, client won't fire events
  79. while wait(1/30) do
  80. if h~=Mouse.Hit or t~=Mouse.Target then
  81. h,t=Mouse.Hit,Mouse.Target
  82. Event:FireServer({isMouse=true,Target=t,Hit=h})
  83. end
  84. end]==],Player.Character)
  85. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  86. end
  87. script.Parent=nil
  88.  
  89. local Phrases={
  90. Normal={
  91. 'It is certain.',
  92. 'It is decidedly so.',
  93. 'Without a doubt.',
  94. 'Yes, definitely.',
  95. 'You may rely on it.',
  96. 'As I see it, yes.',
  97. 'Most likely.',
  98. 'Outlook good.',
  99. 'Yes.',
  100. 'Signs point to yes.',
  101. 'Reply hazy, try again.',
  102. 'Ask again later.',
  103. 'Better not tell you now.',
  104. 'Cannot predict now.',
  105. 'Concentrate and ask again.',
  106. "Don't count on it.", --when you have to use double qoute marks bc visual studio code is nib
  107. 'My reply is no.',
  108. 'My sources say no.',
  109. 'Outlook not so good.',
  110. 'Very doubtful.',
  111. "I don't know, don't ask me.",
  112. "Stop asking me questions, I don't know you!",
  113. 'Si.',
  114. 'Die, please.',
  115. 'Do us all a favor, and jump off a cliff.',
  116. 'Are you proud of yourself? Forcing me to answer questions?',
  117. 'Inflict mortal wounds upon thou.',
  118. 'Get a life.',
  119. 'I hate you.',
  120. 'You are ugly.',
  121. "You are a real piece of work, aren't you?",
  122. "You look good... dead.",
  123. 'I love Emilia.',
  124. 'Your waifu is shit.',
  125. 'Please, finish your bleach Honey.',
  126. "Excuse you, I'll have you know I am a free gendered 8 ball and I am Triggered.",
  127. 'Your head would look nice on a plaque.',
  128. 'Silly noose, living is for kids!'
  129. }
  130. }
  131.  
  132. local Music={
  133. 525721279,153013930,146200300,331990690,261244793,168448499,143666548,511444520,220278293,327120974,257895708,188304771,486129548,144427010,302115882,293503658,211881225,539545533,332870209,284819869,537652707,377835896,272226201
  134. }
  135.  
  136. local Dice={145486970,145486927,441388880,252118631}
  137.  
  138. local Colors={
  139. Color3.fromRGB(244,66,66),
  140. Color3.fromRGB(244,149,66),
  141. Color3.fromRGB(244,203,66),
  142. Color3.fromRGB(83,244,66),
  143. Color3.fromRGB(66,244,212),
  144. Color3.fromRGB(66,152,244),
  145. Color3.fromRGB(107,66,244),
  146. Color3.fromRGB(229,66,244)
  147. }
  148.  
  149. local X=1
  150. local Y=1
  151. local Z=1
  152. local Xinc=1
  153. local Yinc=1.5
  154. local Zinc=-2
  155. local Sine=0
  156. local Change=1
  157.  
  158. local Rolled=false
  159.  
  160. local Rainbow=false
  161.  
  162. local Script=Instance.new('Script')
  163. Script.Name='Cherry8Ball'
  164. Script.Parent=workspace
  165.  
  166. function Part(Color,Transparency,Anchored,CanCollide,Material,Size,CFrame,Locked,Parent)
  167. local P=Instance.new'Part'
  168. P.BrickColor=BrickColor.new(Color)
  169. P.Transparency=Transparency
  170. P.Anchored=Anchored
  171. P.CanCollide=CanCollide
  172. P.Material=Material
  173. P.Size=Size --Vector3.new(.1,.1,.1)
  174. P.CFrame=CFrame --CFrame.new(RootPart.CFrame.X+3,RootPart.CFrame.Y,RootPart.CFrame.Z+3)
  175. P.Locked=Locked
  176. P.Parent=Parent
  177.  
  178. return P
  179. end
  180.  
  181. function Sound(Name,Looped,Pitch,Volume,ID,Parent)
  182. local Snd=Instance.new('Sound')
  183. Snd.Name=Name
  184. Snd.SoundId='rbxassetid://'..ID
  185. Snd.Looped=Looped
  186. Snd.PlaybackSpeed=Pitch
  187. Snd.Volume=Volume
  188. Snd.EmitterSize=30
  189. Snd.MaxDistance=300
  190. Snd.Parent=Parent
  191. Snd:Play()
  192.  
  193. return Snd
  194. end
  195.  
  196. function NoOutline(Part)
  197. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface=10,10,10,10,10,10
  198. end
  199.  
  200. function Mesh(Mesh,Parent,MeshType,MeshId,Offset,Scale)
  201. local _Mesh=Instance.new(Mesh)
  202. _Mesh.Parent=Parent
  203.  
  204. if Mesh=='SpecialMesh' then
  205. _Mesh.MeshType=MeshType
  206. _Mesh.MeshId=MeshId
  207. end
  208.  
  209. _Mesh.Offset=Offset
  210. _Mesh.Scale=Scale
  211.  
  212. return _Mesh
  213. end
  214.  
  215. --function Part(Color,Transparency,Anchored,CanCollide,Material,Size,CFrame,Locked,Parent)
  216. --Mesh(Mesh,Parent,MeshType,MeshId,Offset,Scale)
  217. local EightBall=Part('Black',0,true,false,'SmoothPlastic',Vector3.new(.1,.1,.1),CFrame.new(30,0,30),true,Script)
  218. Mesh('SpecialMesh',EightBall,'FileMesh','rbxassetid://514529431',Vector3.new(0,0,0),Vector3.new(3,3,3))
  219. NoOutline(EightBall)
  220. local Light=Instance.new('PointLight')
  221. Light.Range=30
  222. Light.Brightness=10
  223. Light.Parent=EightBall
  224.  
  225. local Board=Part('Industrial white',1,true,false,'SmoothPlastic',Vector3.new(26,12,2),CFrame.new(EightBall.CFrame.X,EightBall.CFrame.Y+16,EightBall.CFrame.Z),true,EightBall)
  226. NoOutline(Board)
  227.  
  228. function ColorChange(Partz)
  229. while game:GetService'RunService'.RenderStepped:wait() do
  230. local Color=Colors[math.random(1,#Colors)]
  231.  
  232. if Rainbow==true then
  233. EightBall.Material='Neon'
  234. EightBall.BrickColor=BrickColor.new(Color)
  235. Light.Color=Color
  236. else
  237. EightBall.Material='SmoothPlastic'
  238. EightBall.BrickColor=BrickColor.new('Black')
  239. Light.Color=Color3.fromRGB(255,255,255)
  240. end
  241. end
  242. end
  243.  
  244. UI=Instance.new'SurfaceGui'
  245. UI.Adornee=Board
  246. UI.Parent=Board
  247. UI.Name='UI'
  248.  
  249. Frame=Instance.new'Frame'
  250. Frame.BackgroundColor3=Color3.new(1,1,1)
  251. Frame.BackgroundTransparency=1
  252. Frame.BorderColor3=Color3.new(.105882,.164706,.207843)
  253. Frame.Size=UDim2.new(1,0,1,0)
  254. Frame.Parent=UI
  255.  
  256. Question=Instance.new'TextLabel'
  257. Question.BackgroundColor3=Color3.new(1,1,1)
  258. Question.BackgroundTransparency=1
  259. Question.BorderColor3=Color3.new(.105882,.164706,.207843)
  260. Question.Name='Question'
  261. Question.Size=UDim2.new(1,0,.45,0)
  262. Question.Text=''
  263. Question.TextScaled=true
  264. Question.TextWrapped=true
  265. Question.TextColor3=Color3.new(1,1,1)
  266. Question.TextStrokeTransparency=0.7
  267. Question.Font=Enum.Font.Cartoon
  268. Question.FontSize=Enum.FontSize.Size14
  269. Question.TextXAlignment=Enum.TextXAlignment.Left
  270. Question.TextYAlignment=Enum.TextYAlignment.Top
  271. Question.Parent=Frame
  272.  
  273. Answer=Instance.new'TextLabel'
  274. Answer.BackgroundColor3=Color3.new(1,1,1)
  275. Answer.BackgroundTransparency=1
  276. Answer.BorderColor3=Color3.new(.105882,.164706,.207843)
  277. Answer.Name='Answer'
  278. Answer.Position=UDim2.new(0,0,.45,0)
  279. Answer.Size=UDim2.new(1,0,.45,0)
  280. Answer.Text=''
  281. Answer.TextScaled=true
  282. Answer.TextWrapped=true
  283. Answer.TextColor3=Color3.new(1,1,1)
  284. Answer.TextStrokeTransparency=.7
  285. Answer.Font=Enum.Font.Cartoon
  286. Answer.FontSize=Enum.FontSize.Size14
  287. Answer.TextXAlignment=Enum.TextXAlignment.Right
  288. Answer.TextYAlignment=Enum.TextYAlignment.Bottom
  289. Answer.Parent=Frame
  290.  
  291. local UI2=UI:Clone()
  292. UI2.Parent=Board
  293. UI2.Adornee=Board
  294. UI2.Face='Back'
  295.  
  296. local Snd=Sound('Music',true,1,1,Music[math.random(1,#Music)],EightBall)
  297.  
  298. function Rot()
  299. while game:GetService'RunService'.RenderStepped:wait() do
  300. X=X+Xinc
  301. Y=Y+Yinc
  302. Z=Z-Zinc
  303. Sine=Sine+Change
  304.  
  305. if Rolled==false then
  306. EightBall.CFrame=EightBall.CFrame:Lerp(CFrame.new(EightBall.CFrame.X,5,EightBall.CFrame.Z)*CFrame.Angles(math.rad(X),math.rad(Y),math.rad(Z)),.15)
  307. else
  308. EightBall.CFrame=EightBall.CFrame:Lerp(CFrame.new(EightBall.CFrame.X,5+math.sin(Sine/8)/1.5,EightBall.CFrame.Z)*CFrame.Angles(math.rad(X*2),math.rad(Y*2),math.rad(Z*2)),.15)
  309. end
  310. end
  311. end
  312.  
  313. function GetAnswer(Plr,Msg)
  314. if Msg:sub(1,5):lower():match('8ball') then
  315. if Rolled==false then
  316. Rolled=true
  317. Snd.SoundId='rbxassetid://'..Dice[math.random(1,#Dice)]
  318. Snd.Looped=false
  319. Snd:Play()
  320.  
  321. Rainbow=true
  322.  
  323. Question.Text='...'
  324. Answer.Text='[8Ball]: Thinking...'
  325. UI2.Frame.Question.Text='...'
  326. UI2.Frame.Answer.Text='[8Ball]: Thinking...'
  327.  
  328. wait(Snd.TimeLength+.1)
  329.  
  330. local Answr=Phrases.Normal[math.random(1,#Phrases.Normal)]
  331.  
  332. if Msg:sub(6):lower():match('who birthed yer ass into this world you fuckin cunt') then
  333. Question.Text='['..Plr.Name..']: '..Msg
  334. Answer.Text='[8Ball]: A nigga named mario.'
  335. UI2.Frame.Question.Text='['..Plr.Name..']: '..Msg
  336. UI2.Frame.Answer.Text='[8Ball]: A nigga named mario.'
  337. else
  338. Question.Text='['..Plr.Name..']: '..Msg
  339. Answer.Text='[8Ball]: '..Answr
  340. UI2.Frame.Question.Text='['..Plr.Name..']: '..Msg
  341. UI2.Frame.Answer.Text='[8Ball]: '..Answr
  342. end
  343. wait(5)
  344. Rolled=false
  345. Snd.SoundId='rbxassetid://'..Music[math.random(1,#Music)]
  346. Snd.Looped=true
  347. Snd:Play()
  348.  
  349. Rainbow=false
  350. end
  351. end
  352. end
  353.  
  354. spawn(Rot)
  355. spawn(ColorChange)
  356.  
  357. EightBall.DescendantRemoving:connect(function(Descendant)
  358. if Descendant.Name=='Music' then
  359. Snd=Sound('Music',true,1,1,Music[math.random(1,#Music)],EightBall)
  360. end
  361. end)
  362.  
  363. for i,v in pairs(game:GetService'Players':GetPlayers()) do
  364. v.Chatted:connect(function(Msg) GetAnswer(v,Msg) end)
  365. end
  366.  
  367. game:GetService'Players'.PlayerAdded:connect(function(Plr)
  368. Plr.Chatted:connect(function(Msg) GetAnswer(Plr,Msg) end)
  369. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement