View difference between Paste ID: NuwBvSRP and 0TdKvx1Q
SHOW: | | - or go back to the newest paste.
1
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
2
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
3
do
4
	print("FE Compatibility code by Mokiros")
5
	script.Parent = Player.Character
6
7
	--RemoteEvent for communicating
8
	local Event = Instance.new("RemoteEvent")
9
	Event.Name = "UserInput_Event"
10
11
	--Fake event to make stuff like Mouse.KeyDown work
12
	local function fakeEvent()
13
		local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
14
		t.connect = t.Connect
15
		return t
16
	end
17
18
	--Creating fake input objects with fake variables
19
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
20
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
21
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
22
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
23
	end}
24
	--Merged 2 functions into one by checking amount of arguments
25
	CAS.UnbindAction = CAS.BindAction
26
27
	--This function will trigger the events that have been :Connect()'ed
28
	local function te(self,ev,...)
29
		local t = m[ev]
30
		if t and t._fakeEvent and t.Function then
31
			t.Function(...)
32
		end
33
	end
34
	m.TrigEvent = te
35
	UIS.TrigEvent = te
36
37
	Event.OnServerEvent:Connect(function(plr,io)
38
	    if plr~=Player then return end
39
		if io.isMouse then
40
			m.Target = io.Target
41
			m.Hit = io.Hit
42
		else
43
			local b = io.UserInputState == Enum.UserInputState.Begin
44
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
45
				return m:TrigEvent(b and "Button1Down" or "Button1Up")
46
			end
47
			for _,t in pairs(CAS.Actions) do
48
				for _,k in pairs(t.Keys) do
49
					if k==io.KeyCode then
50
						t.Function(t.Name,io.UserInputState,io)
51
					end
52
				end
53
			end
54
			m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
55
			UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
56
	    end
57
	end)
58
	Event.Parent = NLS([==[
59
	local Player = game:GetService("Players").LocalPlayer
60
	local Event = script:WaitForChild("UserInput_Event")
61
62
	local UIS = game:GetService("UserInputService")
63
	local input = function(io,a)
64
		if a then return end
65
		--Since InputObject is a client-side instance, we create and pass table instead
66
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
67
	end
68
	UIS.InputBegan:Connect(input)
69
	UIS.InputEnded:Connect(input)
70
71
	local Mouse = Player:GetMouse()
72
	local h,t
73
	--Give the server mouse data 30 times every second, but only if the values changed
74
	--If player is not moving their mouse, client won't fire events
75
	while wait(1/30) do
76
		if h~=Mouse.Hit or t~=Mouse.Target then
77
			h,t=Mouse.Hit,Mouse.Target
78
			Event:FireServer({isMouse=true,Target=t,Hit=h})
79
		end
80
	end]==],Player.Character)
81
	Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
82
end
83
84
plr = owner
85
char = plr.Character
86
87
88
print("By Theamazingnater")
89
print("Wow, I can't believe nobody made a Mario Sunshine script. Nebula that's your cue.")
90
print("Controls:")
91
print("Click: Shoot water")
92
print("E to refill water")
93
94
95
local FLUDD = Instance.new("Part",char)
96
FLUDD.CanCollide = false
97
local mesh = Instance.new("FileMesh",FLUDD)
98
mesh.MeshId = "rbxassetid://431033581"
99
mesh.TextureId = "rbxassetid://431033588"
100
mesh.Scale = Vector3.new(0.01, 0.01, 0.01)
101
local weld = Instance.new("Weld",FLUDD)
102
weld.Part0 = FLUDD
103
weld.Part1 = char.Torso
104
weld.C0 = CFrame.new(-0.0198745728, -1.29713154, 0.881149292, -1, 0, 0, 0, 1, 0, 0, 0, -1)
105
local nozzletip = Instance.new("Part",FLUDD)
106
nozzletip.Size = Vector3.new(1.28, 1.26, 0.34)
107
nozzletip.CanCollide = false
108
nozzletip.Transparency = 1
109
local weld = Instance.new("Weld",nozzletip)
110
weld.Part0 = nozzletip
111
weld.Part1 = FLUDD
112
weld.C0 = CFrame.new(0.0432662964, -1.92287493, 0.714660645, -0.998149037, 0, -0.0608149767, 0, 1, 0, 0.0608149767, 0, -0.998149037)
113
local particle = Instance.new("ParticleEmitter",nozzletip)
114
particle.EmissionDirection = "Front"
115
particle.Texture = "rbxasset://textures/ui/Smooth.png"
116
particle.Transparency = NumberSequence.new(0.5)
117
particle.Enabled = false
118
particle.Lifetime = NumberRange.new(1.8)
119
particle.Rate = 1000
120
particle.Speed = NumberRange.new(5)
121
particle.Acceleration = Vector3.new(0, -10, 0)
122
particle.VelocityInheritance = 1
123
particle.Size = NumberSequence.new{
124
NumberSequenceKeypoint.new(0,0),
125
NumberSequenceKeypoint.new(0.1, 0.1), 
126
NumberSequenceKeypoint.new(0.9, 0.1),  
127
NumberSequenceKeypoint.new(1, 0)}
128
particle.Color = ColorSequence.new(Color3.fromRGB(35, 205, 255))
129
local music = Instance.new("Sound",char)
130
music.SoundId = "rbxassetid://237230814"
131
music.Volume = 4
132
music.Looped = true
133
music:Play()
134
135
136
local rhandweld = Instance.new("Weld",char)
137
rhandweld.Part0 = char.Torso
138
rhandweld.Part1 = char["Right Arm"]
139
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)
140
local lhandweld = Instance.new("Weld",char)
141
lhandweld.Part0 = char.Torso
142
lhandweld.Part1 = char["Left Arm"]
143
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)
144
holding = false
145-
water = 5000 -- Total water in tank
145+
water = 99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 -- Total water in tank
146
PlrGui = plr.PlayerGui
147
NewInstance = function(instance,parent,properties)
148
	local inst = Instance.new(instance)
149
	inst.Parent = parent
150
	if(properties)then
151
		for i,v in next, properties do
152
			pcall(function() inst[i] = v end)
153
		end
154
	end
155
	return inst;
156
end
157
local gui = NewInstance("ScreenGui",PlrGui,{})
158
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,})
159
function spray()
160
	if holding == false then
161
		holding = true
162
		while holding and water > 0 do
163
			particle.Enabled = true
164
			particle.Speed = NumberRange.new(20)
165
			water = water - 1
166
			wait()
167
		end
168
		particle.Enabled = false
169
		particle.Speed = NumberRange.new(5)
170
	end
171
end
172
Mouse.Button1Down:connect(function()
173
	spray()
174
end)
175
Mouse.Button1Up:connect(function()
176
	holding = false
177
end)
178
Mouse.KeyDown:connect(function(k)
179
	if k == "e" then
180
		holding = true
181-
		while holding and water ~= 5000 do
181+
		while holding and water ~= inf do
182
		water = water + 1
183
		wait()
184
		end
185
	end
186
end)
187
Mouse.KeyUp:connect(function(k)
188
	if k == "e" then
189
		holding = false
190
	end
191
end)
192
while true do
193
    wait()
194-
	txt.Text = "Water: " .. water .. " milligrams"
194+
	txt.Text = "Water: " .. water .. " gallons you need help desperate"
195
end