View difference between Paste ID: GHPs95HU and WVmzCgYV
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,game,owner = owner,game
3
local RealPlayer = Player
4
do
5
    local rp = RealPlayer
6
    script.Parent = rp.Character
7
   
8
    --RemoteEvent for communicating
9
    local Event = Instance.new("RemoteEvent")
10
    Event.Name = "UserInput_Event"
11
 
12
    --Fake event to make stuff like Mouse.KeyDown work
13
    local function fakeEvent()
14
        local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
15
        t.connect = t.Connect
16
        return t
17
    end
18
 
19
    --Creating fake input objects with fake variables
20
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
21
    local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
22
    local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
23
        CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
24
    end}
25
    --Merged 2 functions into one by checking amount of arguments
26
    CAS.UnbindAction = CAS.BindAction
27
 
28
    --This function will trigger the events that have been :Connect()'ed
29
    local function te(self,ev,...)
30
        local t = m[ev]
31
        if t and t._fakeEvent then
32
            for _,f in pairs(t.Functions) do
33
                f(...)
34
            end
35
        end
36
    end
37
    m.TrigEvent = te
38
    UIS.TrigEvent = te
39
 
40
    Event.OnServerEvent:Connect(function(plr,io)
41
        if plr~=rp then return end
42
        m.Target = io.Target
43
        m.Hit = io.Hit
44
        if not io.isMouse then
45
            local b = io.UserInputState == Enum.UserInputState.Begin
46
            if io.UserInputType == Enum.UserInputType.MouseButton1 then
47
                return m:TrigEvent(b and "Button1Down" or "Button1Up")
48
            end
49
            for _,t in pairs(CAS.Actions) do
50
                for _,k in pairs(t.Keys) do
51
                    if k==io.KeyCode then
52
                        t.Function(t.Name,io.UserInputState,io)
53
                    end
54
                end
55
            end
56
            m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
57
            UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
58
        end
59
    end)
60
    Event.Parent = NLS([==[
61
    local Player = game:GetService("Players").LocalPlayer
62
    local Event = script:WaitForChild("UserInput_Event")
63
 
64
    local Mouse = Player:GetMouse()
65
    local UIS = game:GetService("UserInputService")
66
    local input = function(io,a)
67
        if a then return end
68
        --Since InputObject is a client-side instance, we create and pass table instead
69
        Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
70
    end
71
    UIS.InputBegan:Connect(input)
72
    UIS.InputEnded:Connect(input)
73
 
74
    local h,t
75
    --Give the server mouse data 30 times every second, but only if the values changed
76
    --If player is not moving their mouse, client won't fire events
77
    while wait(1/30) do
78
        if h~=Mouse.Hit or t~=Mouse.Target then
79
            h,t=Mouse.Hit,Mouse.Target
80
            Event:FireServer({isMouse=true,Target=t,Hit=h})
81
        end
82
    end]==],Player.Character)
83
 
84
    ----Sandboxed game object that allows the usage of client-side methods and services
85
    --Real game object
86
    local _rg = game
87
 
88
    --Metatable for fake service
89
    local fsmt = {
90
        __index = function(self,k)
91
            local s = rawget(self,"_RealService")
92
            if s then return s[k] end
93
        end,
94
        __newindex = function(self,k,v)
95
            local s = rawget(self,"_RealService")
96
            if s then s[k]=v end
97
        end,
98
        __call = function(self,...)
99
            local s = rawget(self,"_RealService")
100
            if s then return s(...) end
101
        end
102
    }
103
    local function FakeService(t,RealService)
104
        t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
105
        return setmetatable(t,fsmt)
106
    end
107
 
108
    --Fake game object
109
    local g = {
110
        GetService = function(self,s)
111
            return self[s]
112
        end,
113
        Players = FakeService({
114
            LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
115
        },"Players"),
116
        UserInputService = FakeService(UIS,"UserInputService"),
117
        ContextActionService = FakeService(CAS,"ContextActionService"),
118
    }
119
    rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
120
    g.service = g.GetService
121
   
122
    g.RunService = FakeService({
123
        RenderStepped = _rg:GetService("RunService").Heartbeat,
124
        BindToRenderStep = function(self,name,_,fun)
125
            self._btrs[name] = self.Heartbeat:Connect(fun)
126
        end,
127
        UnbindFromRenderStep = function(self,name)
128
            self._btrs[name]:Disconnect()
129
        end,
130
    },"RunService")
131
 
132
    setmetatable(g,{
133
        __index=function(self,s)
134
            return _rg:GetService(s) or typeof(_rg[s])=="function"
135
            and function(_,...)return _rg[s](_rg,...)end or _rg[s]
136
        end,
137
        __newindex = fsmt.__newindex,
138
        __call = fsmt.__call
139
    })
140
    --Changing owner to fake player object to support owner:GetMouse()
141
    game,owner = g,g.Players.LocalPlayer
142
end
143
local plr = game:GetService("Players").LocalPlayer
144
local plrg = plr.PlayerGui
145
local mouse = plr:GetMouse()
146
local char = plr.Character
147
local h = char:FindFirstChild("Head")
148
local t = char:FindFirstChild("Torso")
149
local ra = char:FindFirstChild("Right Arm")
150
local la = char:FindFirstChild("Left Arm")
151
local rl = char:FindFirstChild("Right Leg")
152
local ll = char:FindFirstChild("Left Leg")
153
local rs = t:FindFirstChild("Right Shoulder")
154
local ls = t:FindFirstChild("Left Shoulder")
155
local rh = t:FindFirstChild("Right Hip")
156
local lh = t:FindFirstChild("Left Hip")
157
local nec = t.Neck
158
local rut = char.HumanoidRootPart
159
local rutj = rut.RootJoint
160
local hum = char:FindFirstChildOfClass("Humanoid")
161
local tweens = game:GetService("TweenService")
162
local scr = Instance.new("ScreenGui",plrg)
163
local bil = Instance.new("BillboardGui",char) bil.Name = "ChatFunc" bil.Adornee = h bil.Size = UDim2.new(1,0,1,0) bil.StudsOffset = Vector3.new(0,2,0)
164
local rad = math.rad
165
local huge = math.huge
166
local brcf = rutj.C0
167
local trans = 1
168
local trans1 = 0
169
local intros = 1.1
170
local intross = .6
171
local crnc = false
172
local mcro = false
173
local ek = false
174
local began = false
175
local using = false
176
local deb = true
177
local deb1 = false
178
local defc0 = {nec.C0,rutj.C0,rs.C0,ls.C0,rh.C0,lh.C0}
179
local defc1 = {nec.C1,rutj.C1,rs.C1,ls.C1,rh.C1,lh.C1}
180
local rw = Instance.new("Weld",ra) rw.Part0 = ra rw.Part1 = nil rw.C1 = CFrame.new(1.5,.5,0) rw.C0 = CFrame.new(0,.5,0)
181
local lw = Instance.new("Weld",la) lw.Part0 = la lw.Part1 = nil lw.C1 = CFrame.new(-1.5,.5,0) lw.C0 = CFrame.new(0,.5,0)
182
local punc = Instance.new("Sound",char) punc.Volume = 4 punc.SoundId = "rbxassetid://260430117"
183
local blob = Instance.new("Sound",workspace) blob.Volume = 4 blob.SoundId = "rbxassetid://264486467"
184
local ff = Instance.new("ForceField",char) ff.Visible = false
185
local hitb = Instance.new("Part",char) hitb.Size = Vector3.new(1.5,1.5,1.5) hitb.CanCollide = false hitb.Transparency = 1
186
local weldo = Instance.new("Weld",hitb) weldo.Part0 = ra weldo.Part1 = hitb weldo.C0 = CFrame.new(0,-.5,0)
187
local tlerp = function(inst,tablee,leinght,easingstyle,easingdirec)
188
	local info = TweenInfo.new(
189
	leinght,
190
	easingstyle,
191
	easingdirec,
192
	0,
193
	false,
194
	0
195
	)
196
	local lerp = tweens:Create(inst,info,tablee)
197
	lerp:Play()
198
end
199
function fling(hoo,direc,power)
200
	local endd = false
201
	local vel = Instance.new("BodyVelocity",hoo) vel.MaxForce = Vector3.new(huge,huge,huge) vel.Velocity = direc * power
202
	coroutine.resume(coroutine.create(function()
203
		wait(1)
204
		vel:Destroy()
205
		wait(1)
206
		if not endd then
207
			blob.TimePosition = .2
208
			blob:Play()
209-
			local expl = Instance.new("Explosion",workspace) expl.Position = hoo.Position
209+
210-
			hoo.Parent:BreakJoints()
210+
211
212
hoo.Touched:connect(function(hit)
213
		if not endd and hit.Parent ~= hoo.Parent and hit.Parent ~= char and hit.Name ~= "SuperFireEEE" then
214
			endd = true
215
			vel:Destroy()
216
			blob.TimePosition = .2
217
			blob:Play()
218
		end
219
	end)
220-
			local expl = Instance.new("Explosion",workspace) expl.Position = hoo.Position
220+
221-
			hoo.Parent:BreakJoints()
221+
222
		if not deb and hit.Parent ~= char then
223
		if hit.Parent:FindFirstChild("Torso") ~= nil and hit.Parent:FindFirstChildOfClass("Humanoid") ~= nil or hit.Parent:FindFirstChild("UpperTorso") ~= nil and hit.Parent:FindFirstChildOfClass("Humanoid") ~= nil then
224
			deb = true
225
			punc:Play()
226
			hit.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = true
227
			local t = hit.Parent:FindFirstChild("Torso") or hit.Parent:FindFirstChild("UpperTorso")
228
			local cf = CFrame.new(t.Position,mouse.Hit.p)
229
			for i = 1,math.random(3,5) do
230
	fire(t,char,"Maroon","Crimson",math.random(2,6)/math.random(8,12),.1,1.5,"SmoothPlastic",math.random(-1,1),1,"Block",math.random(15,25),0,.5,false)
231
			end
232
			fling(t,cf.lookVector,400)
233
			end
234
		end
235
	end)
236
function fire(partp,parent,color1,color2,ssize,osize,leinght,material,minr,maxr,shape,spread,st,ot,onlyraise)
237
	local part = Instance.new("Part",parent) part.Name = "SuperFireEEE" part.Size = Vector3.new(ssize,ssize,ssize) part.Transparency = st part.CanCollide = false part.Anchored = true part.Shape = shape part.Material = material part.BrickColor = BrickColor.new(color1) part.CFrame = partp.CFrame * CFrame.new(partp.Size.x/math.random(-20,20),partp.Size.y/math.random(-20,20),partp.Size.z/math.random(-20,20))
238
	if onlyraise == true then
239
		part.CFrame = CFrame.new(part.CFrame.p,Vector3.new(nil,part.CFrame.y,part.CFrame.z))
240
	else
241
		
242
	end
243
	local pcf = part.CFrame
244
	tlerp(part,{CFrame = pcf * CFrame.new(math.random(-spread,spread)/math.random(2,4),math.random(minr,maxr),math.random(-spread,spread)/math.random(2,4)) * CFrame.Angles(rad(math.random(-180,180)),rad(math.random(-180,180)),rad(math.random(-180,180))),Size = Vector3.new(osize,osize,osize),Color = BrickColor.new(color2).Color,Transparency = ot},leinght,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut)
245
	game:GetService("Debris"):AddItem(part,leinght)
246
end
247
function PlusUltra()
248
	using = true
249
	rw.Part1 = t lw.Part1 = t
250
	local tiem = .6
251
	tlerp(rutj,{C0 = defc0[2] * CFrame.Angles(rad(-10),rad(0),rad(-30))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
252
	tlerp(nec,{C0 = defc0[1] * CFrame.Angles(rad(10),rad(0),rad(30))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
253
	tlerp(rw,{C0 = CFrame.new(0,.2,-.3) * CFrame.Angles(rad(-110),rad(20),rad(0))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
254
	tlerp(lw,{C0 = CFrame.new(0,.9,0) * CFrame.Angles(rad(-80),rad(0),rad(40)) * CFrame.Angles(rad(0),rad(-40),rad(0))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
255
	tlerp(rh,{C0 = defc0[5] * CFrame.Angles(rad(-5),rad(10),rad(-10))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
256
	tlerp(lh,{C0 = defc0[6] * CFrame.Angles(rad(-5),rad(10),rad(10))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
257
	wait(tiem)
258
	coroutine.resume(coroutine.create(function()
259
	for i = 1,7 do
260
	fire(ra,char,"White","Black",math.random(10,20)/math.random(8,12),.1,1.7,"Neon",math.random(7,9),math.random(12,15),"Block",math.random(13,20),math.random(3,6)/10,1,false)
261
		wait(.06)
262
	end
263
	end))
264
	deb = false
265
	tiem = .3
266
	tlerp(rutj,{C0 = defc0[2] * CFrame.Angles(rad(10),rad(0),rad(60))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
267
	tlerp(nec,{C0 = defc0[1] * CFrame.Angles(rad(-10),rad(0),rad(-60))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
268
	tlerp(rw,{C0 = CFrame.new(0,.8,-.3) * CFrame.Angles(rad(-115),rad(40),rad(20))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
269
	tlerp(lw,{C0 = CFrame.new(0,.3,0) * CFrame.Angles(rad(-80),rad(0),rad(20)) * CFrame.Angles(rad(0),rad(-40),rad(0))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
270
	tlerp(rh,{C0 = defc0[5] * CFrame.Angles(rad(-5),rad(10),rad(10))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
271
	tlerp(lh,{C0 = defc0[6] * CFrame.Angles(rad(-5),rad(10),rad(-10))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
272
	wait(tiem)
273
	deb = true
274
	tiem = .7
275
	tlerp(rutj,{C0 = defc0[2]},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
276
	tlerp(nec,{C0 = defc0[1]},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
277
	tlerp(rw,{C0 = CFrame.new(0,.5,0)},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
278
	tlerp(lw,{C0 = CFrame.new(0,.5,0)},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
279
	tlerp(rh,{C0 = defc0[5]},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
280
	tlerp(lh,{C0 = defc0[6]},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
281
	wait(tiem)
282
	using = false
283
	rw.Part1 = nil lw.Part1 = nil
284
end
285
mouse.KeyDown:connect(function(key)
286
	if key == "e" and not using then
287
		PlusUltra()
288
	end
289
	if key == "t" and hitb.Transparency == 1 then
290
		hitb.Transparency = 0
291
	elseif key == "t" and hitb.Transparency == 0 then
292
		hitb.Transparency = 1
293
	end
294
end)