Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Controls:
- LCTRL: Fire a friendliness pellet
- K: Evil laugh
- Z: Angry flowy
- J: Spooky flowy theme
- G: Normal flowy theme
- F: Stop music
- X: Remove dialogue box
- 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")
- 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
- ]]--
- dot = false
- shoot = true
- des = false
- local ChatService = game:GetService("Chat")
- for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
- if v:IsA('Part') then v.Transparency = 1
- if v:IsA('Hat') then v.Handle.Transparency = 1
- end
- end
- end
- local player = owner
- player.Character.Head.face:Remove()
- m=player:GetMouse()
- bb = Instance.new("BillboardGui",player.Character.Head)
- bb.Enabled = true
- bb.AlwaysOnTop = true
- bb.Size = UDim2.new(0,200,0,50)
- bb.StudsOffset = Vector3.new(-0.5,-0.5,0)
- fl = Instance.new("Part",player.Character)
- fl.FormFactor = 3
- fl.Size = Vector3.new(3,3,0.01)
- fl.Transparency = 1
- aa = 0.075
- fl.CanCollide = false
- dec = Instance.new("Decal",fl)
- dec.Face = "Front"
- dec.Texture = "rbxassetid://379128237"
- dec1 = Instance.new("Decal",fl)
- dec1.Face = "Back"
- dec1.Texture = "rbxassetid://379128324"
- wel = Instance.new("Weld",fl)
- wel.Part0=fl
- wel.Part1=player.Character.Torso
- wel.C0 = CFrame.new(0,2,0)
- gui=Instance.new("TextBox",bb)
- gui.Text = "* "
- gui.Size = UDim2.new(0,266,0,90)
- gui.Position=UDim2.new(0,94,0,-60)
- gui.TextColor3 = Color3.new(255,255,255)
- gui.BackgroundColor3=Color3.new(0,0,0)
- gui.TextWrapped = true
- gui.TextScaled = true
- gui.TextXAlignment = "Left"
- gui.TextYAlignment = "Top"
- gui.Visible = false
- gui.BorderColor3 = Color3.new(0,0,0)
- gui1=Instance.new("TextButton",bb)
- gui1.Position=UDim2.new(0,5,0,-66)
- gui1.Size = UDim2.new(0,380,0,102)
- gui1.TextColor3 = Color3.new(255,255,255)
- gui1.BackgroundColor3=Color3.new(255,255,255)
- gui1.Visible = false
- img = Instance.new("ImageLabel",bb)
- img.Size = UDim2.new(0,92,0,94)
- img.Position = UDim2.new(0,15,0,-62)
- img.Image = "rbxassetid://340492116"
- img.BorderColor3 = Color3.new(0,0,0)
- img.Visible = false
- sid = "379851665"
- asd = Instance.new("Sound",player.Character.Torso)
- asd.SoundId = "http://www.roblox.com/asset/?id =379851665"
- asd1 = Instance.new("Sound",player.Character.Torso)
- asd1.SoundId = "http://www.roblox.com/asset/?id =379851665"
- asd2 = Instance.new("Sound",player.Character.Torso)
- asd2.SoundId = "http://www.roblox.com/asset/?id = 317393485"
- asd2.Looped = true
- asd3 = Instance.new("Sound",player.Character.Torso)
- asd3.SoundId = "http://www.roblox.com/asset/?id = 316014309"
- asd3.Looped = true
- asd4 = Instance.new("Sound",player.Character.Torso)
- asd4.SoundId = "http://www.roblox.com/asset/?id = 370435986"
- asd4.Looped = true
- asd5 = Instance.new("Sound",player.Character.Torso)
- asd5.SoundId = "http://www.roblox.com/asset/?id = 379865908"
- asd5.Looped = true
- asd6 = Instance.new("Sound",player.Character.Torso)
- asd6.SoundId = "http://www.roblox.com/asset/?id = 379865908"
- asd7 = Instance.new("Sound",player.Character.Torso)
- asd7.SoundId = "http://www.roblox.com/asset/?id = 379874748"
- asd7.Looped = true
- m.KeyDown:connect(function(k)
- if k == string.char(50) then
- if shoot == true then
- shoot = false
- b = Instance.new("Part",workspace)
- b.CFrame = fl.CFrame * CFrame.new(0,0,1)
- b.BrickColor = BrickColor.new("asd")
- b.TopSurface = "Universal"
- b.BottomSurface = "Universal"
- b.LeftSurface = 0
- b.RightSurface = 0
- b.FrontSurface = 0
- b.BackSurface = 0
- b.FormFactor = 3
- b.Size = Vector3.new(0.2,0.2,0.5)
- b.Material = "Neon"
- b.Anchored = false
- b.CanCollide = false
- b.Reflectance = 0
- b.Velocity = CFrame.new(b.Position,player:GetMouse().Hit.p).lookVector * 200
- b.Touched:connect(function(h)
- if h.Parent.Name ==game.Players.LocalPlayer.Name then
- x = h.Parent:findFirstChild("Humanoid")
- x:TakeDamage(0)
- else x = h.Parent:findFirstChild("Humanoid")
- if x then
- x:TakeDamage(15)
- end end end)
- wait(0.3)
- b:Remove()
- shoot = true
- end
- end
- end)
- function play(play)
- asd:Play()
- asd1:Play()
- end
- eye = Instance.new("Part",player.Character)
- eye.BrickColor = BrickColor.new("Toothpaste")
- eye.Material = "Neon"
- eye.FormFactor = 3
- eye.Shape = "Ball"
- eye.Size = Vector3.new(0.37,0.37,0.1)
- weld = Instance.new("Weld",eye)
- weld.Part0 = eye
- weld.Part1 = player.Character.Head
- weld.C0 = CFrame.new(0.1,-0.2,0.45)
- eye.Transparency = 1
- -- listen for their chatting
- player.Chatted:connect(function(message)
- a = string.len(message)
- gui.Text = "* "
- gui.Visible = true
- gui1.Visible = true
- des = false
- img.Visible = true
- print(a)
- if dot == false then
- for i = 1,string.len(message) do wait(aa)
- gui.Text =gui.Text..message:sub(i,i)
- play()
- end
- end
- des = true
- end)
- m.KeyDown:connect(function(k)
- if k == "g" then
- asd2:Play()
- eye.Transparency = 1
- end
- end)
- m.KeyDown:connect(function(k)
- if k == "z" then
- aa = 0.08
- asd1.SoundId = "http://www.roblox.com/asset/?id =379862308"
- asd.SoundId = "http://www.roblox.com/asset/?id =379862308"
- img.Image = "rbxassetid://311067910"
- end
- end)
- m.KeyDown:connect(function(k)
- if k == "c" then
- aa=0.075
- asd1.SoundId = "http://www.roblox.com/asset/?id =379851665"
- asd.SoundId = "http://www.roblox.com/asset/?id =379851665"
- img.Image = "rbxassetid://340492116"
- end
- end)
- m.KeyDown:connect(function(k)
- if k == "n" then
- sid = "379851665"
- --img.Image = "rbxassetid://379880202"
- end
- end)
- m.KeyDown:connect(function(k)
- if k == "b" then
- --img.Image = "rbxassetid://379866291"
- end
- end)
- m.KeyDown:connect(function(k)
- if k == "m" then
- --img.Image = "rbxassetid://379866374"
- end
- end)
- m.KeyDown:connect(function(k)
- if k == "v" then
- --img.Image = "rbxassetid://378619540"
- end
- end)
- m.KeyDown:connect(function(k)
- if k == "k" then
- asd6:Play()
- end
- end)
- m.KeyDown:connect(function(k)
- if k == "j" then
- asd7:Play()
- end
- end)
- m.KeyDown:connect(function(k)
- if k == "x" then
- if des == true then
- gui.Visible = false
- gui.Text = "* "
- gui1.Visible = false
- img.Visible = false
- end
- end
- end)
- m.KeyDown:connect(function(k)
- if k == "f" then
- asd3:Stop()
- asd2:Stop()
- asd7:Stop()
- asd4:Stop()
- eye.Transparency = 1
- asd5:Stop()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement