Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --https://github.com/Mokiros/roblox-FE-compatibility
- 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
- print("FE Compatibility code V2 by Mokiros")
- local RealPlayer = RealPlayer
- script.Parent = RealPlayer.Character
- --Fake event to make stuff like Mouse.KeyDown work
- local Disconnect_Function = function(this)
- this[1].Functions[this[2]] = nil
- end
- local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
- local FakeEvent_Metatable = {__index={
- Connect = function(this,f)
- local i = tostring(math.random(0,10000))
- while this.Functions[i] do
- i = tostring(math.random(0,10000))
- end
- this.Functions[i] = f
- return setmetatable({this,i},Disconnect_Metatable)
- end
- }}
- FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
- local function fakeEvent()
- return setmetatable({Functions={}},FakeEvent_Metatable)
- end
- --Creating fake input objects with fake variables
- local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
- FakeMouse.keyUp = FakeMouse.KeyUp
- FakeMouse.keyDown = FakeMouse.KeyDown
- 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 TriggerEvent(self,ev,...)
- for _,f in pairs(self[ev].Functions) do
- f(...)
- end
- end
- FakeMouse.TriggerEvent = TriggerEvent
- UIS.TriggerEvent = TriggerEvent
- --Client communication
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=RealPlayer then return end
- FakeMouse.Target = io.Target
- FakeMouse.Hit = io.Hit
- if not io.isMouse then
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
- end
- if io.UserInputType == Enum.UserInputType.MouseButton2 then
- return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
- 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
- FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
- local Mouse = owner:GetMouse()
- local UIS = game:GetService("UserInputService")
- local input = function(io,RobloxHandled)
- if RobloxHandled 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 every second frame, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- local HB = game:GetService("RunService").Heartbeat
- while true 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
- --Wait 2 frames
- for i=1,2 do
- HB:Wait()
- end
- end]==],script)
- ----Sandboxed game object that allows the usage of client-side methods and services
- --Real game object
- local RealGame = game
- --Metatable for fake service
- local FakeService_Metatable = {
- __index = function(self,k)
- local s = rawget(self,"_RealService")
- if s then
- return typeof(s[k])=="function"
- and function(_,...)return s[k](s,...)end or s[k]
- end
- end,
- __newindex = function(self,k,v)
- local s = rawget(self,"_RealService")
- if s then s[k]=v end
- end
- }
- local function FakeService(t,RealService)
- t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
- return setmetatable(t,FakeService_Metatable)
- end
- --Fake game object
- local FakeGame = {
- GetService = function(self,s)
- return rawget(self,s) or RealGame:GetService(s)
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- RunService = FakeService({
- _btrs = {},
- RenderStepped = RealGame: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")
- }
- rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
- FakeGame.service = FakeGame.GetService
- FakeService(FakeGame,game)
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = FakeGame,FakeGame.Players.LocalPlayer
- end
- print ("IF U LEAK IL SENT DUOLINGO TO VANISH U ")
- CV="White"
- p = game.Players.LocalPlayer
- char = p.Character
- local txt = Instance.new("BillboardGui", char)
- txt.Adornee = char .Head
- txt.Name = "_status"
- txt.Size = UDim2.new(2, 0, 1.2, 0)
- txt.StudsOffset = Vector3.new(-9, 8, 0)
- local text = Instance.new("TextLabel", txt)
- text.Size = UDim2.new(10, 0, 7, 0)
- text.FontSize = "Size24"
- text.TextScaled = true
- text.TextTransparency = 0
- text.BackgroundTransparency = 1
- text.TextTransparency = 0
- text.TextStrokeTransparency = 1
- text.Font = "Arcade"
- text.TextStrokeColor3 = Color3.fromRGB(255,0,0)
- v=Instance.new("Part")
- v.Name = "ColorBrick"
- v.Parent=p.Character
- v.FormFactor="Symmetric"
- v.Anchored=true
- v.CanCollide=false
- v.BottomSurface="Smooth"
- v.TopSurface="Smooth"
- v.Size=Vector3.new(10,5,3)
- v.Transparency=1
- v.CFrame=char.Torso.CFrame
- v.BrickColor=BrickColor.new(CV)
- v.Transparency=1
- text.TextColor3 = Color3.fromRGB(53,41,5)
- v.Shape="Block"
- text.Text = "ultimate_meme_man.png"
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Tool0 = Instance.new("Tool")
- Part1 = Instance.new("Part")
- Sound2 = Instance.new("Sound")
- Sound3 = Instance.new("Sound")
- SpecialMesh4 = Instance.new("SpecialMesh")
- Animation5 = Instance.new("Animation")
- LocalScript6 = Instance.new("LocalScript")
- Script7 = Instance.new("Script")
- Tool8 = Instance.new("Tool")
- Part9 = Instance.new("Part")
- Sound10 = Instance.new("Sound")
- Sound11 = Instance.new("Sound")
- SpecialMesh12 = Instance.new("SpecialMesh")
- Animation13 = Instance.new("Animation")
- LocalScript14 = Instance.new("LocalScript")
- Script15 = Instance.new("Script")
- Tool16 = Instance.new("Tool")
- RemoteEvent17 = Instance.new("RemoteEvent")
- RemoteEvent18 = Instance.new("RemoteEvent")
- LocalScript19 = Instance.new("LocalScript")
- Script20 = Instance.new("Script")
- Configuration21 = Instance.new("Configuration")
- NumberValue22 = Instance.new("NumberValue")
- NumberValue23 = Instance.new("NumberValue")
- NumberValue24 = Instance.new("NumberValue")
- NumberValue25 = Instance.new("NumberValue")
- NumberValue26 = Instance.new("NumberValue")
- NumberValue27 = Instance.new("NumberValue")
- NumberValue28 = Instance.new("NumberValue")
- MeshPart29 = Instance.new("MeshPart")
- Sound30 = Instance.new("Sound")
- Sound31 = Instance.new("Sound")
- Decal32 = Instance.new("Decal")
- Decal33 = Instance.new("Decal")
- Part34 = Instance.new("Part")
- BillboardGui35 = Instance.new("BillboardGui")
- ImageLabel36 = Instance.new("ImageLabel")
- CFrameValue37 = Instance.new("CFrameValue")
- Decal38 = Instance.new("Decal")
- RemoteEvent39 = Instance.new("RemoteEvent")
- Tool0.Name = "asd"
- Tool0.Parent = mas
- Tool0.TextureId = "http://www.roblox.com/asset/?id=27808126"
- Tool0.Grip = CFrame.new(0, 0, 0.200000003, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Tool0.GripPos = Vector3.new(0, 0, 0.200000003)
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- Part1.CFrame = CFrame.new(-5.36770678, 5.59981394, -25.8906975, 1.33541107e-08, 0, -0.999999821, -1.37761235e-05, 0.99999994, 0, 0.99999994, 1.37761235e-05, -6.40635562e-08)
- Part1.Orientation = Vector3.new(0, -90, 0)
- Part1.Position = Vector3.new(-5.36770678, 5.59981394, -25.8906975)
- Part1.Rotation = Vector3.new(-180, -89.9700012, 0)
- Part1.Size = Vector3.new(1, 1.20000005, 1)
- Sound2.Name = "SongLoop"
- Sound2.Parent = Part1
- Sound2.Looped = true
- Sound2.Pitch = 1.5
- Sound2.PlaybackSpeed = 1.5
- Sound2.SoundId = "rbxassetid://536739947"
- Sound2.Volume = 10
- Sound3.Name = "EquipSound"
- Sound3.Parent = Part1
- Sound3.SoundId = "rbxassetid://536739947"
- Sound3.Volume = 10
- SpecialMesh4.Parent = Part1
- SpecialMesh4.MeshId = "http://www.roblox.com/asset/?id=25268275"
- SpecialMesh4.TextureId = "http://www.roblox.com/asset/?id=25268352"
- SpecialMesh4.MeshType = Enum.MeshType.FileMesh
- Animation5.Name = "dance"
- Animation5.Parent = Tool0
- Animation5.AnimationId = "http://www.roblox.com/Asset?ID=27789359"
- LocalScript6.Name = "PotionScript"
- LocalScript6.Parent = Tool0
- table.insert(cors,sandbox(LocalScript6,function()
- local Tool = script.Parent;
- local dancer = nil
- enabled = true
- function onActivated()
- if not enabled then
- return
- end
- enabled = false
- --This call will cause a "wait" until the data comes back
- local root = game:GetService("InsertService"):LoadAsset(27831659)
- local instances = root:GetChildren()
- if #instances == 0 then
- root:Remove()
- return
- end
- local humanoid = Tool.Parent:FindFirstChild("Humanoid")
- local torso = Tool.Parent:FindFirstChild("Torso")
- root = root:FindFirstChild("DiscoBall")
- root.Position = Vector3.new(torso.Position.x, torso.Position.y + 5, torso.Position.z)
- local sparkles = Instance.new("Sparkles")
- sparkles.Parent = root
- local bodyPos = Instance.new("BodyPosition")
- bodyPos.position = Vector3.new(torso.Position.x, torso.Position.y + 15, torso.Position.z)
- bodyPos.P = 10000
- bodyPos.D = 1000
- bodyPos.maxForce = Vector3.new(bodyPos.P,bodyPos.P,bodyPos.P)
- bodyPos.Parent = root
- local rotater = Instance.new("BodyAngularVelocity")
- rotater.P = 100000
- rotater.angularvelocity = Vector3.new(0,1000,0)
- rotater.maxTorque = Vector3.new(rotater.P,rotater.P,rotater.P)
- rotater.Parent = root
- root.Parent = game.Workspace
- dancer = humanoid:LoadAnimation(Tool.dance)
- dancer:Play()
- Tool.Handle.SongLoop:Play()
- wait(15)
- Tool.Handle.SongLoop:Stop()
- dancer:Stop()
- dancer:remove()
- root:remove()
- enabled = true
- end
- function onEquipped()
- Tool.Handle.EquipSound:play()
- end
- function onUnequipped()
- Tool.Handle.EquipSound:stop()
- if dancer ~= nil then
- dancer:Stop()
- dancer:remove()
- end
- end
- Tool.Activated:connect(onActivated)
- Tool.Equipped:connect(onEquipped)
- Tool.Unequipped:connect(OnUnequipped)
- end))
- Script7.Parent = Tool0
- table.insert(cors,sandbox(Script7,function()
- local debounce = false
- function getPlayer(humanoid)
- local players = game.Players:children()
- for i = 1, #players do
- if players[i].Character.Humanoid == humanoid then return players[i] end
- end
- return nil
- end
- function onTouch(part)
- local human = part.Parent:findFirstChild("Humanoid")
- if (human ~= nil) and debounce == false then
- debounce = true
- local player = getPlayer(human)
- if (player == nil) then return end
- script.Parent:clone().Parent = player.Backpack
- wait(2)
- debounce = false
- end
- end
- script.Parent.Parent.Touched:connect(onTouch)
- end))
- Tool8.Name = "DancePotion"
- Tool8.Parent = mas
- Tool8.TextureId = "http://www.roblox.com/asset/?id=27808126"
- Tool8.Grip = CFrame.new(0, 0, 0.200000003, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Tool8.GripPos = Vector3.new(0, 0, 0.200000003)
- Part9.Name = "Handle"
- Part9.Parent = Tool8
- Part9.CFrame = CFrame.new(-5.36770678, 5.59981394, -17.4606991, 1.33541107e-08, 0, -0.999999821, -1.37761235e-05, 0.99999994, 0, 0.99999994, 1.37761235e-05, -6.40635562e-08)
- Part9.Orientation = Vector3.new(0, -90, 0)
- Part9.Position = Vector3.new(-5.36770678, 5.59981394, -17.4606991)
- Part9.Rotation = Vector3.new(-180, -89.9700012, 0)
- Part9.Size = Vector3.new(1, 1.20000005, 1)
- Sound10.Name = "SongLoop"
- Sound10.Parent = Part9
- Sound10.Looped = true
- Sound10.Pitch = 1.5
- Sound10.PlaybackSpeed = 1.5
- Sound10.SoundId = "rbxassetid://2967637471"
- Sound10.Volume = 10
- Sound11.Name = "EquipSound"
- Sound11.Parent = Part9
- Sound11.SoundId = "rbxassetid://1282149571"
- Sound11.Volume = 10
- SpecialMesh12.Parent = Part9
- SpecialMesh12.MeshId = "http://www.roblox.com/asset/?id=94246763"
- SpecialMesh12.Scale = Vector3.new(0.649999976, 0.649999976, 0.649999976)
- SpecialMesh12.TextureId = "http://www.roblox.com/asset/?id=96871887"
- SpecialMesh12.MeshType = Enum.MeshType.FileMesh
- Animation13.Name = "dance"
- Animation13.Parent = Tool8
- Animation13.AnimationId = "http://www.roblox.com/Asset?ID=27789359"
- LocalScript14.Name = "PotionScript"
- LocalScript14.Parent = Tool8
- table.insert(cors,sandbox(LocalScript14,function()
- local Tool = script.Parent;
- local dancer = nil
- enabled = true
- function onActivated()
- if not enabled then
- return
- end
- enabled = false
- --This call will cause a "wait" until the data comes back
- local root = game:GetService("InsertService"):LoadAsset(27831659)
- local instances = root:GetChildren()
- if #instances == 0 then
- root:Remove()
- return
- end
- local humanoid = Tool.Parent:FindFirstChild("Humanoid")
- local torso = Tool.Parent:FindFirstChild("Torso")
- root = root:FindFirstChild("DiscoBall")
- root.Position = Vector3.new(torso.Position.x, torso.Position.y + 5, torso.Position.z)
- local sparkles = Instance.new("Sparkles")
- sparkles.Parent = root
- local bodyPos = Instance.new("BodyPosition")
- bodyPos.position = Vector3.new(torso.Position.x, torso.Position.y + 15, torso.Position.z)
- bodyPos.P = 10000
- bodyPos.D = 1000
- bodyPos.maxForce = Vector3.new(bodyPos.P,bodyPos.P,bodyPos.P)
- bodyPos.Parent = root
- local rotater = Instance.new("BodyAngularVelocity")
- rotater.P = 100000
- rotater.angularvelocity = Vector3.new(0,1000,0)
- rotater.maxTorque = Vector3.new(rotater.P,rotater.P,rotater.P)
- rotater.Parent = root
- root.Parent = game.Workspace
- dancer = humanoid:LoadAnimation(Tool.dance)
- dancer:Play()
- Tool.Handle.SongLoop:Play()
- wait(15)
- Tool.Handle.SongLoop:Stop()
- dancer:Stop()
- dancer:remove()
- root:remove()
- enabled = true
- end
- function onEquipped()
- Tool.Handle.EquipSound:play()
- end
- function onUnequipped()
- Tool.Handle.EquipSound:stop()
- if dancer ~= nil then
- dancer:Stop()
- dancer:remove()
- end
- end
- Tool.Activated:connect(onActivated)
- Tool.Equipped:connect(onEquipped)
- Tool.Unequipped:connect(OnUnequipped)
- end))
- Script15.Parent = Tool8
- table.insert(cors,sandbox(Script15,function()
- local debounce = false
- function getPlayer(humanoid)
- local players = game.Players:children()
- for i = 1, #players do
- if players[i].Character.Humanoid == humanoid then return players[i] end
- end
- return nil
- end
- function onTouch(part)
- local human = part.Parent:findFirstChild("Humanoid")
- if (human ~= nil) and debounce == false then
- debounce = true
- local player = getPlayer(human)
- if (player == nil) then return end
- script.Parent:clone().Parent = player.Backpack
- wait(2)
- debounce = false
- end
- end
- script.Parent.Parent.Touched:connect(onTouch)
- end))
- Tool16.Name = "Pistol"
- Tool16.Parent = mas
- Tool16.TextureId = "rbxassetid://131768786"
- Tool16.Grip = CFrame.new(-0.792874813, -0.37231636, 0.112739533, 0.0692615658, 0, -0.997598529, 0, 1, 0, 0.997598529, 0, 0.0692615658)
- Tool16.GripForward = Vector3.new(0.997598529, -0, -0.0692615658)
- Tool16.GripPos = Vector3.new(-0.792874813, -0.37231636, 0.112739533)
- Tool16.GripRight = Vector3.new(0.0692615658, 0, 0.997598529)
- Tool16.ToolTip = "Activate the Trigger Happy special by pressing E or using the mobile button!"
- RemoteEvent17.Name = "Hit"
- RemoteEvent17.Parent = Tool16
- RemoteEvent18.Name = "Fire"
- RemoteEvent18.Parent = Tool16
- LocalScript19.Name = "Client"
- LocalScript19.Parent = Tool16
- table.insert(cors,sandbox(LocalScript19,function()
- --//Variables\\--
- local tool = script.Parent
- local handle = tool:WaitForChild("Handle")
- local contextActionService = game:GetService("ContextActionService")
- local player = game.Players.LocalPlayer
- local mouse = player:GetMouse()
- local character = player.Character or player.CharacterAdded:Wait()
- local enabled = true
- local specialDB = true
- local cursorId = "http://www.roblox.com/asset/?id=251497633"
- local hitId = "http://www.roblox.com/asset/?id=70785856"
- local configs = tool:WaitForChild("Configurations")
- local fireRate = configs:FindFirstChild("FireRate")
- local specialRechargeTime = configs:FindFirstChild("SpecialRechargeTime")
- local fire = tool:WaitForChild("Fire")
- local activateSpecial = tool:WaitForChild("ActivateSpecial")
- local hit = tool:WaitForChild("Hit")
- --//Custom Functions\\--
- function activate()
- if specialDB then
- specialDB = false
- activateSpecial:FireServer()
- else
- end
- end
- --//Tool Function\\--
- tool.Equipped:Connect(function()
- contextActionService:BindAction("ActivateSpecial", activate, true, Enum.KeyCode.E)
- contextActionService:SetImage("ActivateSpecial", tool.TextureId)
- contextActionService:SetPosition("ActivateSpecial", UDim2.new(0.72, -25, 0.20, -25))
- mouse.Icon = cursorId
- end)
- tool.Unequipped:Connect(function()
- contextActionService:UnbindAction("ActivateSpecial")
- mouse.Icon = ""
- end)
- tool.Activated:Connect(function()
- if not enabled then return end
- enabled = false
- fire:FireServer(mouse.Hit)
- wait(fireRate.Value)
- enabled = true
- end)
- hit.OnClientEvent:Connect(function()
- mouse.Icon = hitId
- handle.Hitmark:Play()
- wait(0.075)
- mouse.Icon = cursorId
- end)
- activateSpecial.OnClientEvent:Connect(function()
- for i = specialRechargeTime.Value, 0, -1 do
- wait(1)
- specialDB = false
- print("Recharging: "..i)
- end
- specialDB = true
- end)
- end))
- Script20.Name = "Server"
- Script20.Parent = Tool16
- table.insert(cors,sandbox(Script20,function()
- --//Variables\\--
- local tool = script.Parent
- local handle = tool:WaitForChild("Handle")
- local muzzle = tool:WaitForChild("Muzzle")
- local muzzleFlash = muzzle:WaitForChild("MuzzleFlash")
- local muzzleEffect = muzzleFlash:WaitForChild("MuzzleEffect")
- local configs = tool:WaitForChild("Configurations")
- local fireRate = configs:FindFirstChild("FireRate")
- local maxDamage = configs:FindFirstChild("MaxDamage")
- local minDamage = configs:FindFirstChild("MinDamage")
- local velocity = configs:FindFirstChild("Velocity")
- local accuracy = configs:FindFirstChild("Accuracy")
- local specialDuration = configs:FindFirstChild("SpecialDuration")
- local specialRechargeTime = configs:FindFirstChild("SpecialRechargeTime")
- local showDamageText = true
- local debris = game:GetService("Debris")
- local fire = tool:WaitForChild("Fire")
- local activateSpecial = tool:WaitForChild("ActivateSpecial")
- local hit = tool:WaitForChild("Hit")
- --//Custom Functions\\--
- function TagHumanoid(humanoid, player)
- local Creator_Tag = Instance.new("ObjectValue")
- Creator_Tag.Name = "creator"
- Creator_Tag.Value = player
- debris:AddItem(Creator_Tag, 0.3)
- Creator_Tag.Parent = humanoid
- end
- function UntagHumanoid(humanoid)
- for i, v in pairs(humanoid:GetChildren()) do
- if v:IsA("ObjectValue") and v.Name == "creator" then
- v:Destroy()
- end
- end
- end
- function TextEffects(element, floatAmount, direction, style, duration)
- element:TweenPosition(UDim2.new(0, math.random(-40, 40), 0, -floatAmount), direction, style, duration)
- wait(0.5)
- for i = 1, 60 do
- element.TextTransparency = element.TextTransparency + 1/60
- element.TextStrokeTransparency = element.TextStrokeTransparency + 1/60
- wait(1/60)
- end
- element.TextTransparency = element.TextTransparency + 1
- element.TextStrokeTransparency = element.TextStrokeTransparency + 1
- element.Parent:Destroy()
- end
- function DynamicText(damage, criticalPoint, humanoid)
- local bill = Instance.new("BillboardGui", humanoid.Parent.Head)
- bill.Size = UDim2.new(0, 50, 0, 100)
- local part = Instance.new("TextLabel", bill)
- bill.AlwaysOnTop = true
- part.TextColor3 = Color3.fromRGB(255, 0, 0)
- part.Text = damage
- part.Font = Enum.Font.SourceSans
- part.TextStrokeTransparency = 0
- part.Size = UDim2.new(1, 0, 1, 0)
- part.Position = UDim2.new(0, 0, 0, 0)
- part.BackgroundTransparency = 1
- bill.Adornee = bill.Parent
- if damage < criticalPoint then
- part.TextSize = 28
- part.TextColor3 = Color3.new(1, 0, 0)
- elseif damage >= criticalPoint then
- part.TextSize = 32
- part.TextColor3 = Color3.new(1, 1, 0)
- end
- spawn(function()
- TextEffects(part, 85, Enum.EasingDirection.Out, Enum.EasingStyle.Quint, 0.75)
- end)
- end
- function DamageAndTagHumanoid(player, humanoid, damage)
- hit:FireClient(player)
- UntagHumanoid(handle)
- humanoid:TakeDamage(damage) TagHumanoid(humanoid, player)
- end
- --//Remote Functions\\--
- fire.OnServerEvent:Connect(function(player, mouseHit)
- local character = player.Character
- local humanoid = character:FindFirstChild("Humanoid")
- local weaponAccuracy = Vector3.new(math.random(-accuracy.Value * 2, accuracy.Value * 2), math.random(-accuracy.Value * 2, accuracy.Value * 2), math.random(-accuracy.Value * 2, accuracy.Value * 2))
- if humanoid and humanoid ~= 0 then
- local projectile = Instance.new("Part", workspace)
- local trail = Instance.new("Trail", projectile)
- trail.FaceCamera = true
- trail.Lifetime = 0.3
- trail.MinLength = 0.15
- trail.LightEmission = 0.25
- local attachment0 = Instance.new("Attachment", projectile)
- attachment0.Position = Vector3.new(0.35, 0, 0)
- attachment0.Name = "Attachment1"
- local attachment1 = Instance.new("Attachment", projectile)
- attachment1.Position = Vector3.new(-0.35, 0, 0)
- attachment1.Name = "Attachment1"
- trail.Attachment0 = attachment0
- trail.Attachment1 = attachment1
- projectile.Name = "Bullet"
- projectile.BrickColor = BrickColor.new("Smoky gray")
- projectile.Shape = "Ball"
- projectile.Material = Enum.Material.Metal
- projectile.TopSurface = 0
- projectile.BottomSurface = 0
- projectile.Size = Vector3.new(1, 1, 1)
- projectile.Transparency = 1
- projectile.CFrame = CFrame.new(muzzle.CFrame.p, mouseHit.p)
- projectile.CanCollide = false
- local transparencyPoints = {}
- local startColor = Color3.new(255, 255, 0)
- local endColor = Color3.new(213, 115, 61)
- table.insert(transparencyPoints, NumberSequenceKeypoint.new(0, 1))
- table.insert(transparencyPoints, NumberSequenceKeypoint.new(0.25, 0))
- table.insert(transparencyPoints, NumberSequenceKeypoint.new(1, 1))
- local determinedTransparency = NumberSequence.new(transparencyPoints)
- local determinedColors = ColorSequence.new(startColor, endColor)
- trail.Transparency = determinedTransparency
- trail.Color = determinedColors
- local bodyVelocity = Instance.new("BodyVelocity", projectile)
- bodyVelocity.MaxForce = Vector3.new(9e9, 9e9, 9e9)
- bodyVelocity.Velocity = (mouseHit.lookVector * velocity.Value) + weaponAccuracy
- debris:AddItem(projectile, 20)
- projectile.Touched:Connect(function(hit)
- local eHumanoid = hit.Parent:FindFirstChild("Humanoid") or hit.Parent.Parent:FindFirstChild("Humanoid")
- local damage = math.random(minDamage.Value, maxDamage.Value)
- if not eHumanoid and not hit.Anchored and not hit:IsDescendantOf(character) then
- projectile:Destroy()
- elseif eHumanoid and eHumanoid ~= humanoid and eHumanoid.Health > 0 and hit ~= projectile then
- if hit.Name == "Head" or hit:IsA("Hat") then
- damage = damage * 1.5
- end
- local criticalPoint = maxDamage.Value
- DamageAndTagHumanoid(player, eHumanoid, damage)
- if showDamageText then
- DynamicText(damage, criticalPoint, eHumanoid)
- else
- end
- projectile:Destroy()
- elseif hit.CanCollide == true and not hit:IsDescendantOf(player.Character) and hit.Anchored == true then
- projectile:Destroy()
- end
- end)
- handle.Fire:Play()
- muzzleEffect.Visible = true
- muzzleEffect.Rotation = math.random(-360, 360)
- delay(0.1, function()
- muzzleEffect.Visible = false
- end)
- end
- end)
- activateSpecial.OnServerEvent:Connect(function(player)
- accuracy.Value, fireRate.Value = accuracy.Value / 2, fireRate.Value / 2
- minDamage.Value, maxDamage.Value = minDamage.Value / 2, maxDamage.Value / 2
- spawn(function()
- local chargeSound = Instance.new("Sound", player.PlayerGui)
- chargeSound.Name = "ChargeSound"
- chargeSound.SoundId = "rbxassetid://163619849"
- chargeSound:Play()
- chargeSound.Ended:Connect(function() chargeSound:Destroy() end)
- local sparkles = Instance.new("Sparkles", handle)
- sparkles.SparkleColor = Color3.fromRGB(255, 236, 21)
- local activatedGui = Instance.new("ScreenGui", player.PlayerGui)
- activatedGui.Name = "SpecialActivated"
- local textLabel = Instance.new("TextLabel", activatedGui)
- textLabel.TextColor3 = Color3.fromRGB(0, 180, 30)
- textLabel.Text = "Trigger Happy activated!"
- textLabel.Font = Enum.Font.SourceSans
- textLabel.TextScaled = true
- textLabel.TextStrokeTransparency = 0
- textLabel.Size = UDim2.new(0, 300, 0, 50)
- textLabel.Position = UDim2.new(2.5, 0, 0.15, -10)
- textLabel.BackgroundTransparency = 1
- textLabel:TweenPosition(UDim2.new(0.5, -(textLabel.Size.X.Offset / 2), 0.1, -10), Enum.EasingDirection.Out, Enum.EasingStyle.Back, 1)
- debris:AddItem(sparkles, specialDuration.Value)
- debris:AddItem(chargeSound, 3)
- wait(3)
- TextEffects(textLabel, 200, Enum.EasingDirection.InOut, Enum.EasingStyle.Quint, 1)
- end)
- for i = specialDuration.Value, 0, -1 do
- wait(1)
- print("Special activated: "..i)
- end
- accuracy.Value, fireRate.Value = accuracy.Value * 2, fireRate.Value * 2
- minDamage.Value, maxDamage.Value = minDamage.Value * 2, maxDamage.Value * 2
- activateSpecial:FireClient(player)
- end)
- end))
- Configuration21.Name = "Configurations"
- Configuration21.Parent = Tool16
- NumberValue22.Name = "FireRate"
- NumberValue22.Parent = Configuration21
- NumberValue22.Value = 0.175
- NumberValue23.Name = "MinDamage"
- NumberValue23.Parent = Configuration21
- NumberValue23.Value = 14
- NumberValue24.Name = "MaxDamage"
- NumberValue24.Parent = Configuration21
- NumberValue24.Value = 17
- NumberValue25.Name = "Velocity"
- NumberValue25.Parent = Configuration21
- NumberValue25.Value = 625
- NumberValue26.Name = "Accuracy"
- NumberValue26.Parent = Configuration21
- NumberValue26.Value = 9
- NumberValue27.Name = "SpecialDuration"
- NumberValue27.Parent = Configuration21
- NumberValue27.Value = 15
- NumberValue28.Name = "SpecialRechargeTime"
- NumberValue28.Parent = Configuration21
- NumberValue28.Value = 60
- MeshPart29.Name = "Handle"
- MeshPart29.Parent = Tool16
- MeshPart29.CFrame = CFrame.new(2.36680508, 0.805296123, -16.4796658, -3.7252903e-08, -2.25397741e-07, 1, -3.25429551e-06, 0.99999994, 2.25339136e-07, -1, -3.25482756e-06, -3.7252903e-08)
- MeshPart29.Orientation = Vector3.new(0, 90, 0)
- MeshPart29.Position = Vector3.new(2.36680508, 0.805296123, -16.4796658)
- MeshPart29.Rotation = Vector3.new(0, 90, 0)
- MeshPart29.Size = Vector3.new(2.26067781, 1.53063464, 0.306364536)
- MeshPart29.CanCollide = false
- MeshPart29.Material = Enum.Material.Metal
- MeshPart29.TextureID = "rbxassetid://623102879"
- Sound30.Name = "Fire"
- Sound30.Parent = MeshPart29
- Sound30.MaxDistance = 20000
- Sound30.SoundId = "rbxassetid://618667795"
- Sound30.Volume = 3
- Sound31.Name = "Hitmark"
- Sound31.Parent = MeshPart29
- Sound31.Pitch = 0.60000002384186
- Sound31.PlaybackSpeed = 0.60000002384186
- Sound31.SoundId = "rbxassetid://618667795"
- Sound31.Volume = 10
- Decal32.Parent = MeshPart29
- Decal32.Texture = "http://www.roblox.com/asset/?id=396766472"
- Decal32.Face = Enum.NormalId.Back
- Decal33.Parent = MeshPart29
- Decal33.Texture = "http://www.roblox.com/asset/?id=396766472"
- Part34.Name = "Muzzle"
- Part34.Parent = Tool16
- Part34.CFrame = CFrame.new(-6.05337858, 1.32602787, -12.5993204, 0.0692615658, 3.11348858e-09, 0.997598529, -0.0177569855, 0.999841571, 0.00123284035, -0.997440577, -0.0177996811, 0.0692505985)
- Part34.Orientation = Vector3.new(-0.0700000003, 86.0299988, -1.01999998)
- Part34.Position = Vector3.new(-6.05337858, 1.32602787, -12.5993204)
- Part34.Rotation = Vector3.new(-1.01999998, 86.0299988, 0)
- Part34.Transparency = 1
- Part34.Size = Vector3.new(0.100000001, 0.100000001, 0.100000001)
- Part34.BottomSurface = Enum.SurfaceType.Smooth
- Part34.CanCollide = false
- Part34.TopSurface = Enum.SurfaceType.Smooth
- BillboardGui35.Name = "MuzzleFlash"
- BillboardGui35.Parent = Part34
- BillboardGui35.Size = UDim2.new(0, 150, 0, 150)
- BillboardGui35.Active = true
- BillboardGui35.Adornee = Part34
- BillboardGui35.MaxDistance = 150
- ImageLabel36.Name = "MuzzleEffect"
- ImageLabel36.Parent = BillboardGui35
- ImageLabel36.Visible = false
- ImageLabel36.Size = UDim2.new(1, 0, 1, 0)
- ImageLabel36.BackgroundColor = BrickColor.new("Institutional white")
- ImageLabel36.BackgroundColor3 = Color3.new(1, 1, 1)
- ImageLabel36.BackgroundTransparency = 1
- ImageLabel36.Image = "rbxassetid://192664810"
- CFrameValue37.Name = "qRelativeCFrameWeldValue"
- CFrameValue37.Parent = Part34
- CFrameValue37.Value = CFrame.new(-1.15686202, -0.59147644, -0.005217731, 1.00000012, -2.42143869e-08, -6.51925802e-09, -2.42143869e-08, 1, 4.80213203e-09, -6.51925802e-09, 4.80213203e-09, 1)
- Decal38.Parent = Part34
- Decal38.Texture = "http://www.roblox.com/asset/?id=986590742"
- Decal38.Face = Enum.NormalId.Right
- RemoteEvent39.Name = "ActivateSpecial"
- RemoteEvent39.Parent = Tool16
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.Backpack
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
- local Anim = Instance.new("Animation")
- Anim.AnimationId = "rbxassetid://27432691"
- local k = game:GetService("Players").LocalPlayer.Character.Humanoid:LoadAnimation(Anim)
- k:Play()
- k:AdjustSpeed(1)
- wait(1.46)
- k:AdjustSpeed(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement