Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This script has been converted to FE by iPxter
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- do
- print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
- script.Parent = Player.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent and t.Function then
- t.Function(...)
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=Player then return end
- if io.isMouse then
- m.Target = io.Target
- m.Hit = io.Hit
- else
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local Mouse = Player:GetMouse()
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- end]==],Player.Character)
- Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
- end
- script.Parent=nil
- local Phrases={
- Normal={
- 'It is certain.',
- 'It is decidedly so.',
- 'Without a doubt.',
- 'Yes, definitely.',
- 'You may rely on it.',
- 'As I see it, yes.',
- 'Most likely.',
- 'Outlook good.',
- 'Yes.',
- 'Signs point to yes.',
- 'Reply hazy, try again.',
- 'Ask again later.',
- 'Better not tell you now.',
- 'Cannot predict now.',
- 'Concentrate and ask again.',
- "Don't count on it.", --when you have to use double qoute marks bc visual studio code is nib
- 'My reply is no.',
- 'My sources say no.',
- 'Outlook not so good.',
- 'Very doubtful.',
- "I don't know, don't ask me.",
- "Stop asking me questions, I don't know you!",
- 'Si.',
- 'Die, please.',
- 'Do us all a favor, and jump off a cliff.',
- 'Are you proud of yourself? Forcing me to answer questions?',
- 'Inflict mortal wounds upon thou.',
- 'Get a life.',
- 'I hate you.',
- 'You are ugly.',
- "You are a real piece of work, aren't you?",
- "You look good... dead.",
- 'I love Emilia.',
- 'Your waifu is shit.',
- 'Please, finish your bleach Honey.',
- "Excuse you, I'll have you know I am a free gendered 8 ball and I am Triggered.",
- 'Your head would look nice on a plaque.',
- 'Silly noose, living is for kids!'
- }
- }
- local Music={
- 525721279,153013930,146200300,331990690,261244793,168448499,143666548,511444520,220278293,327120974,257895708,188304771,486129548,144427010,302115882,293503658,211881225,539545533,332870209,284819869,537652707,377835896,272226201
- }
- local Dice={145486970,145486927,441388880,252118631}
- local Colors={
- Color3.fromRGB(244,66,66),
- Color3.fromRGB(244,149,66),
- Color3.fromRGB(244,203,66),
- Color3.fromRGB(83,244,66),
- Color3.fromRGB(66,244,212),
- Color3.fromRGB(66,152,244),
- Color3.fromRGB(107,66,244),
- Color3.fromRGB(229,66,244)
- }
- local X=1
- local Y=1
- local Z=1
- local Xinc=1
- local Yinc=1.5
- local Zinc=-2
- local Sine=0
- local Change=1
- local Rolled=false
- local Rainbow=false
- local Script=Instance.new('Script')
- Script.Name='Cherry8Ball'
- Script.Parent=workspace
- function Part(Color,Transparency,Anchored,CanCollide,Material,Size,CFrame,Locked,Parent)
- local P=Instance.new'Part'
- P.BrickColor=BrickColor.new(Color)
- P.Transparency=Transparency
- P.Anchored=Anchored
- P.CanCollide=CanCollide
- P.Material=Material
- P.Size=Size --Vector3.new(.1,.1,.1)
- P.CFrame=CFrame --CFrame.new(RootPart.CFrame.X+3,RootPart.CFrame.Y,RootPart.CFrame.Z+3)
- P.Locked=Locked
- P.Parent=Parent
- return P
- end
- function Sound(Name,Looped,Pitch,Volume,ID,Parent)
- local Snd=Instance.new('Sound')
- Snd.Name=Name
- Snd.SoundId='rbxassetid://'..ID
- Snd.Looped=Looped
- Snd.PlaybackSpeed=Pitch
- Snd.Volume=Volume
- Snd.EmitterSize=30
- Snd.MaxDistance=300
- Snd.Parent=Parent
- Snd:Play()
- return Snd
- end
- function NoOutline(Part)
- Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface=10,10,10,10,10,10
- end
- function Mesh(Mesh,Parent,MeshType,MeshId,Offset,Scale)
- local _Mesh=Instance.new(Mesh)
- _Mesh.Parent=Parent
- if Mesh=='SpecialMesh' then
- _Mesh.MeshType=MeshType
- _Mesh.MeshId=MeshId
- end
- _Mesh.Offset=Offset
- _Mesh.Scale=Scale
- return _Mesh
- end
- --function Part(Color,Transparency,Anchored,CanCollide,Material,Size,CFrame,Locked,Parent)
- --Mesh(Mesh,Parent,MeshType,MeshId,Offset,Scale)
- local EightBall=Part('Black',0,true,false,'SmoothPlastic',Vector3.new(.1,.1,.1),CFrame.new(30,0,30),true,Script)
- Mesh('SpecialMesh',EightBall,'FileMesh','rbxassetid://514529431',Vector3.new(0,0,0),Vector3.new(3,3,3))
- NoOutline(EightBall)
- local Light=Instance.new('PointLight')
- Light.Range=30
- Light.Brightness=10
- Light.Parent=EightBall
- 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)
- NoOutline(Board)
- function ColorChange(Partz)
- while game:GetService'RunService'.RenderStepped:wait() do
- local Color=Colors[math.random(1,#Colors)]
- if Rainbow==true then
- EightBall.Material='Neon'
- EightBall.BrickColor=BrickColor.new(Color)
- Light.Color=Color
- else
- EightBall.Material='SmoothPlastic'
- EightBall.BrickColor=BrickColor.new('Black')
- Light.Color=Color3.fromRGB(255,255,255)
- end
- end
- end
- UI=Instance.new'SurfaceGui'
- UI.Adornee=Board
- UI.Parent=Board
- UI.Name='UI'
- Frame=Instance.new'Frame'
- Frame.BackgroundColor3=Color3.new(1,1,1)
- Frame.BackgroundTransparency=1
- Frame.BorderColor3=Color3.new(.105882,.164706,.207843)
- Frame.Size=UDim2.new(1,0,1,0)
- Frame.Parent=UI
- Question=Instance.new'TextLabel'
- Question.BackgroundColor3=Color3.new(1,1,1)
- Question.BackgroundTransparency=1
- Question.BorderColor3=Color3.new(.105882,.164706,.207843)
- Question.Name='Question'
- Question.Size=UDim2.new(1,0,.45,0)
- Question.Text=''
- Question.TextScaled=true
- Question.TextWrapped=true
- Question.TextColor3=Color3.new(1,1,1)
- Question.TextStrokeTransparency=0.7
- Question.Font=Enum.Font.Cartoon
- Question.FontSize=Enum.FontSize.Size14
- Question.TextXAlignment=Enum.TextXAlignment.Left
- Question.TextYAlignment=Enum.TextYAlignment.Top
- Question.Parent=Frame
- Answer=Instance.new'TextLabel'
- Answer.BackgroundColor3=Color3.new(1,1,1)
- Answer.BackgroundTransparency=1
- Answer.BorderColor3=Color3.new(.105882,.164706,.207843)
- Answer.Name='Answer'
- Answer.Position=UDim2.new(0,0,.45,0)
- Answer.Size=UDim2.new(1,0,.45,0)
- Answer.Text=''
- Answer.TextScaled=true
- Answer.TextWrapped=true
- Answer.TextColor3=Color3.new(1,1,1)
- Answer.TextStrokeTransparency=.7
- Answer.Font=Enum.Font.Cartoon
- Answer.FontSize=Enum.FontSize.Size14
- Answer.TextXAlignment=Enum.TextXAlignment.Right
- Answer.TextYAlignment=Enum.TextYAlignment.Bottom
- Answer.Parent=Frame
- local UI2=UI:Clone()
- UI2.Parent=Board
- UI2.Adornee=Board
- UI2.Face='Back'
- local Snd=Sound('Music',true,1,1,Music[math.random(1,#Music)],EightBall)
- function Rot()
- while game:GetService'RunService'.RenderStepped:wait() do
- X=X+Xinc
- Y=Y+Yinc
- Z=Z-Zinc
- Sine=Sine+Change
- if Rolled==false then
- 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)
- else
- 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)
- end
- end
- end
- function GetAnswer(Plr,Msg)
- if Msg:sub(1,5):lower():match('8ball') then
- if Rolled==false then
- Rolled=true
- Snd.SoundId='rbxassetid://'..Dice[math.random(1,#Dice)]
- Snd.Looped=false
- Snd:Play()
- Rainbow=true
- Question.Text='...'
- Answer.Text='[8Ball]: Thinking...'
- UI2.Frame.Question.Text='...'
- UI2.Frame.Answer.Text='[8Ball]: Thinking...'
- wait(Snd.TimeLength+.1)
- local Answr=Phrases.Normal[math.random(1,#Phrases.Normal)]
- if Msg:sub(6):lower():match('who birthed yer ass into this world you fuckin cunt') then
- Question.Text='['..Plr.Name..']: '..Msg
- Answer.Text='[8Ball]: A nigga named mario.'
- UI2.Frame.Question.Text='['..Plr.Name..']: '..Msg
- UI2.Frame.Answer.Text='[8Ball]: A nigga named mario.'
- else
- Question.Text='['..Plr.Name..']: '..Msg
- Answer.Text='[8Ball]: '..Answr
- UI2.Frame.Question.Text='['..Plr.Name..']: '..Msg
- UI2.Frame.Answer.Text='[8Ball]: '..Answr
- end
- wait(5)
- Rolled=false
- Snd.SoundId='rbxassetid://'..Music[math.random(1,#Music)]
- Snd.Looped=true
- Snd:Play()
- Rainbow=false
- end
- end
- end
- spawn(Rot)
- spawn(ColorChange)
- EightBall.DescendantRemoving:connect(function(Descendant)
- if Descendant.Name=='Music' then
- Snd=Sound('Music',true,1,1,Music[math.random(1,#Music)],EightBall)
- end
- end)
- for i,v in pairs(game:GetService'Players':GetPlayers()) do
- v.Chatted:connect(function(Msg) GetAnswer(v,Msg) end)
- end
- game:GetService'Players'.PlayerAdded:connect(function(Plr)
- Plr.Chatted:connect(function(Msg) GetAnswer(Plr,Msg) end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement