Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- plr = owner
- char = plr.Character
- print("By Theamazingnater")
- print("Wow, I can't believe nobody made a Mario Sunshine script. Nebula that's your cue.")
- print("Controls:")
- print("Click: Shoot water")
- print("E to refill water")
- local FLUDD = Instance.new("Part",char)
- FLUDD.CanCollide = false
- local mesh = Instance.new("FileMesh",FLUDD)
- mesh.MeshId = "rbxassetid://431033581"
- mesh.TextureId = "rbxassetid://431033588"
- mesh.Scale = Vector3.new(0.01, 0.01, 0.01)
- local weld = Instance.new("Weld",FLUDD)
- weld.Part0 = FLUDD
- weld.Part1 = char.Torso
- weld.C0 = CFrame.new(-0.0198745728, -1.29713154, 0.881149292, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- local nozzletip = Instance.new("Part",FLUDD)
- nozzletip.Size = Vector3.new(1.28, 1.26, 0.34)
- nozzletip.CanCollide = false
- nozzletip.Transparency = 1
- local weld = Instance.new("Weld",nozzletip)
- weld.Part0 = nozzletip
- weld.Part1 = FLUDD
- weld.C0 = CFrame.new(0.0432662964, -1.92287493, 0.714660645, -0.998149037, 0, -0.0608149767, 0, 1, 0, 0.0608149767, 0, -0.998149037)
- local particle = Instance.new("ParticleEmitter",nozzletip)
- particle.EmissionDirection = "Front"
- particle.Texture = "rbxasset://textures/ui/Smooth.png"
- particle.Transparency = NumberSequence.new(0.5)
- particle.Enabled = false
- particle.Lifetime = NumberRange.new(1.8)
- particle.Rate = 1000
- particle.Speed = NumberRange.new(5)
- particle.Acceleration = Vector3.new(0, -10, 0)
- particle.VelocityInheritance = 1
- particle.Size = NumberSequence.new{
- NumberSequenceKeypoint.new(0,0),
- NumberSequenceKeypoint.new(0.1, 0.1),
- NumberSequenceKeypoint.new(0.9, 0.1),
- NumberSequenceKeypoint.new(1, 0)}
- particle.Color = ColorSequence.new(Color3.fromRGB(35, 205, 255))
- local music = Instance.new("Sound",char)
- music.SoundId = "rbxassetid://237230814"
- music.Volume = 4
- music.Looped = true
- music:Play()
- local rhandweld = Instance.new("Weld",char)
- rhandweld.Part0 = char.Torso
- rhandweld.Part1 = char["Right Arm"]
- rhandweld.C0 = CFrame.new(1.5, 0.11954546, 0.119522095, 1, -8.40425491e-06, 2.19345093e-05, 0, 0.934387326, 0.356259078, -2.348423e-05, -0.356259137, 0.934387147)
- local lhandweld = Instance.new("Weld",char)
- lhandweld.Part0 = char.Torso
- lhandweld.Part1 = char["Left Arm"]
- lhandweld.C0 = CFrame.new(-1.49998474, 0.0580296516, 0.103591919, 1, -2.19196081e-05, 0.000150620937, -4.3e-05, 0.908508003, 0.41786769, -0.000145971775, -0.417867661, 0.908507943)
- holding = false
- water = 99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 -- Total water in tank
- PlrGui = plr.PlayerGui
- NewInstance = function(instance,parent,properties)
- local inst = Instance.new(instance)
- inst.Parent = parent
- if(properties)then
- for i,v in next, properties do
- pcall(function() inst[i] = v end)
- end
- end
- return inst;
- end
- local gui = NewInstance("ScreenGui",PlrGui,{})
- local txt = NewInstance("TextLabel",gui,{TextStrokeTransparency=.3,TextStrokeColor3=Color3.fromRGB(32, 205, 255),Font=Enum.Font.Arcade,BackgroundTransparency=1,Size=UDim2.new(.48,0,.1,0),Position=UDim2.new(.279,0,.842,0),Text='Water:',TextColor3=Color3.fromRGB(35, 205, 255),TextScaled=true,TextWrapped=true,})
- function spray()
- if holding == false then
- holding = true
- while holding and water > 0 do
- particle.Enabled = true
- particle.Speed = NumberRange.new(20)
- water = water - 1
- wait()
- end
- particle.Enabled = false
- particle.Speed = NumberRange.new(5)
- end
- end
- Mouse.Button1Down:connect(function()
- spray()
- end)
- Mouse.Button1Up:connect(function()
- holding = false
- end)
- Mouse.KeyDown:connect(function(k)
- if k == "e" then
- holding = true
- while holding and water ~= inf do
- water = water + 1
- wait()
- end
- end
- end)
- Mouse.KeyUp:connect(function(k)
- if k == "e" then
- holding = false
- end
- end)
- while true do
- wait()
- txt.Text = "Water: " .. water .. " gallons you need help desperate"
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement