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,game,owner = owner,game
- local RealPlayer = Player
- do
- local rp = RealPlayer
- script.Parent = rp.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,Functions={},Connect=function(self,f)table.insert(self.Functions,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 then
- for _,f in pairs(t.Functions) do
- f(...)
- end
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=rp then return end
- m.Target = io.Target
- m.Hit = io.Hit
- if not io.isMouse then
- 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 Mouse = Player:GetMouse()
- 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,Hit=Mouse.Hit,Target=Mouse.Target})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- 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)
- ----Sandboxed game object that allows the usage of client-side methods and services
- --Real game object
- local _rg = game
- --Metatable for fake service
- local fsmt = {
- __index = function(self,k)
- local s = rawget(self,"_RealService")
- if s then return s[k] end
- end,
- __newindex = function(self,k,v)
- local s = rawget(self,"_RealService")
- if s then s[k]=v end
- end,
- __call = function(self,...)
- local s = rawget(self,"_RealService")
- if s then return s(...) end
- end
- }
- local function FakeService(t,RealService)
- t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
- return setmetatable(t,fsmt)
- end
- --Fake game object
- local g = {
- GetService = function(self,s)
- return self[s]
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- }
- rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
- g.service = g.GetService
- g.RunService = FakeService({
- RenderStepped = _rg:GetService("RunService").Heartbeat,
- BindToRenderStep = function(self,name,_,fun)
- self._btrs[name] = self.Heartbeat:Connect(fun)
- end,
- UnbindFromRenderStep = function(self,name)
- self._btrs[name]:Disconnect()
- end,
- },"RunService")
- setmetatable(g,{
- __index=function(self,s)
- return _rg:GetService(s) or typeof(_rg[s])=="function"
- and function(_,...)return _rg[s](_rg,...)end or _rg[s]
- end,
- __newindex = fsmt.__newindex,
- __call = fsmt.__call
- })
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = g,g.Players.LocalPlayer
- end
- local plr = game:GetService("Players").LocalPlayer
- local plrg = plr.PlayerGui
- local mouse = plr:GetMouse()
- local char = plr.Character
- local h = char:FindFirstChild("Head")
- local t = char:FindFirstChild("Torso")
- local ra = char:FindFirstChild("Right Arm")
- local la = char:FindFirstChild("Left Arm")
- local rl = char:FindFirstChild("Right Leg")
- local ll = char:FindFirstChild("Left Leg")
- local rs = t:FindFirstChild("Right Shoulder")
- local ls = t:FindFirstChild("Left Shoulder")
- local rh = t:FindFirstChild("Right Hip")
- local lh = t:FindFirstChild("Left Hip")
- local nec = t.Neck
- local rut = char.HumanoidRootPart
- local rutj = rut.RootJoint
- local hum = char:FindFirstChildOfClass("Humanoid")
- local tweens = game:GetService("TweenService")
- local scr = Instance.new("ScreenGui",plrg)
- 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)
- local rad = math.rad
- local huge = math.huge
- local brcf = rutj.C0
- local trans = 1
- local trans1 = 0
- local intros = 1.1
- local intross = .6
- local crnc = false
- local mcro = false
- local ek = false
- local began = false
- local using = false
- local deb = true
- local deb1 = false
- local defc0 = {nec.C0,rutj.C0,rs.C0,ls.C0,rh.C0,lh.C0}
- local defc1 = {nec.C1,rutj.C1,rs.C1,ls.C1,rh.C1,lh.C1}
- 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)
- 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)
- local punc = Instance.new("Sound",char["Torso"]) punc.Volume = 0.5 punc.SoundId = "rbxassetid://2770705979"
- local blob = Instance.new("Sound",workspace) blob.Volume = 0.5 blob.SoundId = "rbxassetid://710813246"
- local ff = Instance.new("ForceField",char) ff.Visible = false
- local hitb = Instance.new("Part",char) hitb.Size = Vector3.new(1.5,1.5,1.5) hitb.CanCollide = false hitb.Transparency = 1
- local weldo = Instance.new("Weld",hitb) weldo.Part0 = ra weldo.Part1 = hitb weldo.C0 = CFrame.new(0,-.5,0)
- local tlerp = function(inst,tablee,leinght,easingstyle,easingdirec)
- local info = TweenInfo.new(
- leinght,
- easingstyle,
- easingdirec,
- 0,
- false,
- 0
- )
- local lerp = tweens:Create(inst,info,tablee)
- lerp:Play()
- end
- function fling(hoo,direc,power)
- local endd = false
- local vel = Instance.new("BodyVelocity",hoo) vel.MaxForce = Vector3.new(huge,huge,huge) vel.Velocity = direc * power
- coroutine.resume(coroutine.create(function()
- wait(1)
- vel:Destroy()
- wait(1)
- if not endd then
- blob.TimePosition = .2
- blob:Play()
- local expl = Instance.new("Explosion",workspace) expl.Position = hoo.Position
- hoo.Parent:BreakJoints()
- end
- end))
- hoo.Touched:connect(function(hit)
- if not endd and hit.Parent ~= hoo.Parent and hit.Parent ~= char and hit.Name ~= "SuperFireEEE" then
- endd = true
- vel:Destroy()
- blob.TimePosition = .2
- blob:Play()
- local expl = Instance.new("Explosion",workspace) expl.Position = hoo.Position
- hoo.Parent:BreakJoints()
- end
- end)
- end
- hitb.Touched:connect(function(hit)
- if not deb and hit.Parent ~= char then
- 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
- deb = true
- punc:Play()
- hit.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = true
- local t = hit.Parent:FindFirstChild("Torso") or hit.Parent:FindFirstChild("UpperTorso")
- local cf = CFrame.new(t.Position,mouse.Hit.p)
- for i = 1,math.random(3,5) do
- 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)
- end
- fling(t,cf.lookVector,400)
- end
- end
- end)
- function fire(partp,parent,color1,color2,ssize,osize,leinght,material,minr,maxr,shape,spread,st,ot,onlyraise)
- 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))
- if onlyraise == true then
- part.CFrame = CFrame.new(part.CFrame.p,Vector3.new(nil,part.CFrame.y,part.CFrame.z))
- else
- end
- local pcf = part.CFrame
- 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)
- game:GetService("Debris"):AddItem(part,leinght)
- end
- function PlusUltra()
- using = true
- rw.Part1 = t lw.Part1 = t
- local tiem = .6
- tlerp(rutj,{C0 = defc0[2] * CFrame.Angles(rad(-10),rad(0),rad(-30))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
- tlerp(nec,{C0 = defc0[1] * CFrame.Angles(rad(10),rad(0),rad(30))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
- tlerp(rw,{C0 = CFrame.new(0,.2,-.3) * CFrame.Angles(rad(-110),rad(20),rad(0))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
- 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)
- tlerp(rh,{C0 = defc0[5] * CFrame.Angles(rad(-5),rad(10),rad(-10))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
- tlerp(lh,{C0 = defc0[6] * CFrame.Angles(rad(-5),rad(10),rad(10))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
- wait(tiem)
- coroutine.resume(coroutine.create(function()
- for i = 1,7 do
- 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)
- wait(.06)
- end
- end))
- deb = false
- tiem = .3
- tlerp(rutj,{C0 = defc0[2] * CFrame.Angles(rad(10),rad(0),rad(60))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
- tlerp(nec,{C0 = defc0[1] * CFrame.Angles(rad(-10),rad(0),rad(-60))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
- tlerp(rw,{C0 = CFrame.new(0,.8,-.3) * CFrame.Angles(rad(-115),rad(40),rad(20))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
- 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)
- tlerp(rh,{C0 = defc0[5] * CFrame.Angles(rad(-5),rad(10),rad(10))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
- tlerp(lh,{C0 = defc0[6] * CFrame.Angles(rad(-5),rad(10),rad(-10))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
- wait(tiem)
- deb = true
- tiem = .7
- tlerp(rutj,{C0 = defc0[2]},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
- tlerp(nec,{C0 = defc0[1]},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
- tlerp(rw,{C0 = CFrame.new(0,.5,0)},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
- tlerp(lw,{C0 = CFrame.new(0,.5,0)},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
- tlerp(rh,{C0 = defc0[5]},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
- tlerp(lh,{C0 = defc0[6]},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
- wait(tiem)
- using = false
- rw.Part1 = nil lw.Part1 = nil
- end
- mouse.KeyDown:connect(function(key)
- if key == "e" and not using then
- PlusUltra()
- end
- if key == "t" and hitb.Transparency == 1 then
- hitb.Transparency = 0
- elseif key == "t" and hitb.Transparency == 0 then
- hitb.Transparency = 1
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement