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,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
- --[[
- script by tollepuxis
- used on dragon ball rage
- autosave
- auto-ki
- auto-combat
- keybinds:
- Z - Force-Charge
- X - Force-Ki
- V - Force-Combat
- --]]
- local Player = game:GetService("Players").LocalPlayer
- local PlayerGui = Player.PlayerGui
- local mouse = Player:GetMouse()
- local KiArm = "Right"
- function Notify(txt,type)
- local tgui = Instance.new("ScreenGui")
- local tlabel = Instance.new("TextLabel")
- tgui.Parent = game:GetService("CoreGui")
- tlabel.Parent = tgui
- tlabel.Text = txt
- tlabel.Parent = tgui
- tlabel.Size = UDim2.new(1,0,.05,0)
- tlabel.BackgroundColor3 = Color3.new(.3,.3,.3)
- tlabel.TextColor3 = Color3.new(0,1,0)
- tlabel.Font = "Code"
- tlabel.TextScaled = true
- tlabel.Position = UDim2.new(0,0,1,0)
- tlabel:TweenPosition(UDim2.new(0,0,.35,0),'InOut','Sine',.5)
- tlabel.BackgroundColor3 = Color3.fromRGB(30,30,30)
- tlabel.BorderSizePixel = 0
- local tfr = Instance.new("Frame",tlabel)
- tfr.Size = UDim2.new(1,0,.25,0)
- tfr.Position = UDim2.new(0,0,1,0)
- tfr.BackgroundColor3 = Color3.fromRGB(20,20,20)
- tgui.Name = "Notify"
- tfr.BorderSizePixel = 0
- local type = type or nil
- if type==nil then
- tlabel.TextColor3 = Color3.new(0,1,0)
- else
- tlabel.TextColor3 = Color3.new(1,0,0)
- end
- game:GetService("Debris"):AddItem(tgui,6)
- end
- Notify("Loading...")
- wait(5)
- local IsProto = false
- local IsSynapse = false
- local IsElysian = false
- function CheckExploit()
- if is_protosmasher_caller~=nil then
- IsProto = true
- elseif elysianexecute~=nil then
- IsElysian = true
- elseif Synapse~=nil then
- IsSynapse = true
- elseif not is_protosmasher_caller and not Synapse and not elysianexecute then
- return false
- end
- end
- CheckExploit()
- local version = "0.1.41"
- if IsProto then
- Notify("Loaded ".. version.. " for PROTOSMASHER")
- else
- Notify("I'm sorry, but this can only be used on PROTOSMASHER.")
- end
- function SaveGame()
- local Remote = game.ReplicatedStorage.Remotes.Save
- local Result = Remote:InvokeServer()
- if Result==true then
- Notify("Saved.")
- else
- Notify("Error while saving on ".. "","Error")
- end
- end
- function TypeCombat()
- local EventFunc =
- {
- ["LeftLowerArm"] = Player.Character.LeftLowerArm,
- ["RightUpperArm"] = Player.Character.RightUpperArm,
- ["LeftFoot"] = Player.Character.LeftFoot,
- ["RightHand"] = Player.Character.RightHand,
- ["RightLowerArm"] = Player.Character.RightLowerArm,
- ["LeftUpperLeg"] = Player.Character.LeftUpperLeg,
- ["LeftUpperArm"] = Player.Character.LeftUpperArm,
- ["Character"] = Player.Character,
- ["LeftHand"] = Player.Character.LeftHand,
- ["RightFoot"] = Player.Character.RightFoot,
- ["Humanoid"] = Player.Character.Humanoid,
- ["RightLowerLeg"] = Player.Character.RightLowerLeg,
- ["RightUpperLeg"] = Player.Character.RightUpperLeg,
- ["LeftLowerLeg"] = Player.Character.LeftLowerLeg
- }
- local Event = game:GetService("ReplicatedStorage").Remotes.Training.Combat
- Event:InvokeServer(EventFunc)
- end
- function TypeKiBlast()
- local EventFunc = KiArm
- local Event = game:GetService("ReplicatedStorage").Remotes.Actions.EnergyBlast
- Event:InvokeServer(EventFunc)
- if KiArm=="Right" then
- KiArm="Left"
- else
- KiArm="Right"
- end
- end
- function TypeChargeStart()
- local EventFunc1 = Player.Status
- local EventFunc2 = Player.Character.UpperTorso
- local EventFunc3 = Player.Character.Humanoid
- local Event = game:GetService("ReplicatedStorage").Remotes.Training.Charge
- Event:InvokeServer(EventFunc1,EventFunc2,EventFunc3)
- end
- function TypeDefense()
- local EventFunc1 = Player.Stats
- local EventFunc2 = Player.Status
- local EventFunc3 = Player.Character.Humanoid
- local EventFunc4 = Player.Character.RightHand
- local Event = game:GetService("ReplicatedStorage").Remotes.Training.Defense
- Event:InvokeServer(EventFunc1, EventFunc2, nil, EventFunc4)
- end
- function TypeChargeEnd()
- local Event = game:GetService("ReplicatedStorage").Remotes.Training.ChargeFinish
- Event:FireServer()
- end
- KiBlasting = false--bool
- Punching = false --bool
- Defense = false --bool
- KeyDown = function(key)
- key=key:lower()
- if key=="z" then
- spawn(function() TypeChargeStart() end)
- elseif key=="x" then
- KiBlasting = true
- repeat
- spawn(function() TypeKiBlast() end)
- wait()
- until KiBlasting==false
- elseif key=="v" then
- Punching=true
- repeat
- spawn(function() TypeCombat() end)
- wait()
- until Punching==false
- elseif key=="f" then
- Defense=true
- repeat
- spawn(function() TypeDefense() end)
- wait()
- until Defense==false
- end
- end
- KeyUp = function(key)
- key=key:lower()
- if key=="x" then
- KiBlasting=false
- elseif key=="v" then
- Punching=false
- elseif key=="z" then
- TypeChargeEnd()
- elseif key=="f" then
- Defense = false
- end
- end
- mouse.KeyDown:Connect(KeyDown)
- mouse.KeyUp:Connect(KeyUp)
- wait(6)
- while true do
- SaveGame()
- wait(30)
- end
Add Comment
Please, Sign In to add comment