--[[ Drunk Dealer Complete Script v3.0 - ULTIMATE VERSION Author: Claude Date: 2025-07-08 MAJOR IMPROVEMENTS: - Completely redesigned GUI with modern look - Properly sized hitboxes matching R15 rig - Smooth animations and visual feedback - Better collision detection ]] --[[ ==================================================================================== SECTION 1: SERVER SCRIPT - COPY THIS TO ServerScriptService ==================================================================================== ]] -- Drunk Dealer Server Script v3.0 local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local TweenService = game:GetService("TweenService") -- Create RemoteEvents local remoteFolder = Instance.new("Folder") remoteFolder.Name = "DrunkDealerRemotes" remoteFolder.Parent = ReplicatedStorage local openShopRemote = Instance.new("RemoteEvent") openShopRemote.Name = "OpenWeaponShop" openShopRemote.Parent = remoteFolder local buyWeaponRemote = Instance.new("RemoteEvent") buyWeaponRemote.Name = "BuyWeapon" buyWeaponRemote.Parent = remoteFolder local purchaseResultRemote = Instance.new("RemoteEvent") purchaseResultRemote.Name = "PurchaseResult" purchaseResultRemote.Parent = remoteFolder -- Configuration local SPAWN_POSITION = Vector3.new(0, 10, 0) local NPC_SCALE = 1.3 local INTERACTION_DISTANCE = 25 local WALK_SPEED = 4 -- Standard R15 body part sizes (before scaling) local R15_SIZES = { HumanoidRootPart = Vector3.new(2, 2, 1), UpperTorso = Vector3.new(2, 1.6, 1), LowerTorso = Vector3.new(2, 0.4, 1), Head = Vector3.new(2, 1, 1), UpperArm = Vector3.new(1, 1.2, 1), LowerArm = Vector3.new(1, 1.2, 1), Hand = Vector3.new(1, 0.3, 1), UpperLeg = Vector3.new(1, 1.5, 1), LowerLeg = Vector3.new(1, 1.5, 1), Foot = Vector3.new(1, 0.3, 1) } -- Weapons local WEAPONS = { {name = "Pistole", price = 100, toolName = "Pistol", damage = 20}, {name = "Schrotflinte", price = 500, toolName = "Shotgun", damage = 50}, {name = "Maschinenpistole", price = 1000, toolName = "SMG", damage = 15}, {name = "Scharfschützengewehr", price = 2500, toolName = "Sniper", damage = 100}, {name = "Raketenwerfer", price = 5000, toolName = "RocketLauncher", damage = 200} } -- Bavarian Phrases local BavarianPhrases = { "Servus! Brauchst a Waffn? Drück F zum schaun!", "Heast, Spezi! I hob de bestn Schießeisen vo ganz Bayern!", "Oida, i bin zwoa ang'suffa, oba mei Waffn san guad!", "Griaß di! Drück F für mei Waffnladen!", "Mei liaba! Brauchst wos zum Verteidigen?", "Hoit! I hob Knarren für an guadn Preis!", "Na servas! Mit meine Waffn bist da Boss!", "Schau her! Drück F für's beste Arsenal!", "I hob ois - vo da Pistoln bis zur Bazuka!", "Bist am richtign Ort für a guade Waffn, Spezi!" } -- Create NPC with proper R15 rig local function createDrunkDealer() local npcModel = Instance.new("Model") npcModel.Name = "DrunkDealer" -- Create all R15 body parts with proper sizes -- Root (invisible) local rootPart = Instance.new("Part") rootPart.Name = "HumanoidRootPart" rootPart.Size = R15_SIZES.HumanoidRootPart * NPC_SCALE rootPart.Transparency = 1 rootPart.Anchored = false rootPart.CanCollide = false rootPart.Parent = npcModel -- Torso parts local upperTorso = Instance.new("Part") upperTorso.Name = "UpperTorso" upperTorso.Size = R15_SIZES.UpperTorso * NPC_SCALE upperTorso.BrickColor = BrickColor.new("Black") upperTorso.Material = Enum.Material.Fabric upperTorso.Anchored = false upperTorso.CanCollide = true upperTorso.Parent = npcModel local lowerTorso = Instance.new("Part") lowerTorso.Name = "LowerTorso" lowerTorso.Size = R15_SIZES.LowerTorso * NPC_SCALE lowerTorso.BrickColor = BrickColor.new("Dark grey") lowerTorso.Material = Enum.Material.Fabric lowerTorso.Anchored = false lowerTorso.CanCollide = true lowerTorso.Parent = npcModel -- Head with proper size local head = Instance.new("Part") head.Name = "Head" head.Size = R15_SIZES.Head * NPC_SCALE head.BrickColor = BrickColor.new("Light orange") head.TopSurface = Enum.SurfaceType.Smooth head.BottomSurface = Enum.SurfaceType.Smooth head.Anchored = false head.CanCollide = true head.Parent = npcModel local face = Instance.new("Decal") face.Texture = "rbxasset://textures/face.png" face.Face = Enum.NormalId.Front face.Parent = head local headMesh = Instance.new("SpecialMesh") headMesh.MeshType = Enum.MeshType.Head headMesh.Scale = Vector3.new(1.25, 1.25, 1.25) headMesh.Parent = head -- Arms (Upper, Lower, Hands) local leftUpperArm = Instance.new("Part") leftUpperArm.Name = "LeftUpperArm" leftUpperArm.Size = R15_SIZES.UpperArm * NPC_SCALE leftUpperArm.BrickColor = BrickColor.new("Light orange") leftUpperArm.Anchored = false leftUpperArm.CanCollide = true leftUpperArm.Parent = npcModel local leftLowerArm = Instance.new("Part") leftLowerArm.Name = "LeftLowerArm" leftLowerArm.Size = R15_SIZES.LowerArm * NPC_SCALE leftLowerArm.BrickColor = BrickColor.new("Light orange") leftLowerArm.Anchored = false leftLowerArm.CanCollide = true leftLowerArm.Parent = npcModel local leftHand = Instance.new("Part") leftHand.Name = "LeftHand" leftHand.Size = R15_SIZES.Hand * NPC_SCALE leftHand.BrickColor = BrickColor.new("Light orange") leftHand.Anchored = false leftHand.CanCollide = true leftHand.Parent = npcModel local rightUpperArm = Instance.new("Part") rightUpperArm.Name = "RightUpperArm" rightUpperArm.Size = R15_SIZES.UpperArm * NPC_SCALE rightUpperArm.BrickColor = BrickColor.new("Light orange") rightUpperArm.Anchored = false rightUpperArm.CanCollide = true rightUpperArm.Parent = npcModel local rightLowerArm = Instance.new("Part") rightLowerArm.Name = "RightLowerArm" rightLowerArm.Size = R15_SIZES.LowerArm * NPC_SCALE rightLowerArm.BrickColor = BrickColor.new("Light orange") rightLowerArm.Anchored = false rightLowerArm.CanCollide = true rightLowerArm.Parent = npcModel local rightHand = Instance.new("Part") rightHand.Name = "RightHand" rightHand.Size = R15_SIZES.Hand * NPC_SCALE rightHand.BrickColor = BrickColor.new("Light orange") rightHand.Anchored = false rightHand.CanCollide = true rightHand.Parent = npcModel -- Legs (Upper, Lower, Feet) local leftUpperLeg = Instance.new("Part") leftUpperLeg.Name = "LeftUpperLeg" leftUpperLeg.Size = R15_SIZES.UpperLeg * NPC_SCALE leftUpperLeg.BrickColor = BrickColor.new("Dark grey") leftUpperLeg.Material = Enum.Material.Fabric leftUpperLeg.Anchored = false leftUpperLeg.CanCollide = true leftUpperLeg.Parent = npcModel local leftLowerLeg = Instance.new("Part") leftLowerLeg.Name = "LeftLowerLeg" leftLowerLeg.Size = R15_SIZES.LowerLeg * NPC_SCALE leftLowerLeg.BrickColor = BrickColor.new("Dark grey") leftLowerLeg.Material = Enum.Material.Fabric leftLowerLeg.Anchored = false leftLowerLeg.CanCollide = true leftLowerLeg.Parent = npcModel local leftFoot = Instance.new("Part") leftFoot.Name = "LeftFoot" leftFoot.Size = R15_SIZES.Foot * NPC_SCALE leftFoot.BrickColor = BrickColor.new("Black") leftFoot.Anchored = false leftFoot.CanCollide = true leftFoot.Parent = npcModel local rightUpperLeg = Instance.new("Part") rightUpperLeg.Name = "RightUpperLeg" rightUpperLeg.Size = R15_SIZES.UpperLeg * NPC_SCALE rightUpperLeg.BrickColor = BrickColor.new("Dark grey") rightUpperLeg.Material = Enum.Material.Fabric rightUpperLeg.Anchored = false rightUpperLeg.CanCollide = true rightUpperLeg.Parent = npcModel local rightLowerLeg = Instance.new("Part") rightLowerLeg.Name = "RightLowerLeg" rightLowerLeg.Size = R15_SIZES.LowerLeg * NPC_SCALE rightLowerLeg.BrickColor = BrickColor.new("Dark grey") rightLowerLeg.Material = Enum.Material.Fabric rightLowerLeg.Anchored = false rightLowerLeg.CanCollide = true rightLowerLeg.Parent = npcModel local rightFoot = Instance.new("Part") rightFoot.Name = "RightFoot" rightFoot.Size = R15_SIZES.Foot * NPC_SCALE rightFoot.BrickColor = BrickColor.new("Black") rightFoot.Anchored = false rightFoot.CanCollide = true rightFoot.Parent = npcModel -- Set primary part npcModel.PrimaryPart = rootPart -- Position all parts before creating joints rootPart.CFrame = CFrame.new(SPAWN_POSITION) lowerTorso.CFrame = rootPart.CFrame upperTorso.CFrame = lowerTorso.CFrame * CFrame.new(0, 1 * NPC_SCALE, 0) head.CFrame = upperTorso.CFrame * CFrame.new(0, 1.3 * NPC_SCALE, 0) -- Arms positioning leftUpperArm.CFrame = upperTorso.CFrame * CFrame.new(-1.5 * NPC_SCALE, 0, 0) leftLowerArm.CFrame = leftUpperArm.CFrame * CFrame.new(0, -1 * NPC_SCALE, 0) leftHand.CFrame = leftLowerArm.CFrame * CFrame.new(0, -0.8 * NPC_SCALE, 0) rightUpperArm.CFrame = upperTorso.CFrame * CFrame.new(1.5 * NPC_SCALE, 0, 0) rightLowerArm.CFrame = rightUpperArm.CFrame * CFrame.new(0, -1 * NPC_SCALE, 0) rightHand.CFrame = rightLowerArm.CFrame * CFrame.new(0, -0.8 * NPC_SCALE, 0) -- Legs positioning leftUpperLeg.CFrame = lowerTorso.CFrame * CFrame.new(-0.5 * NPC_SCALE, -0.5 * NPC_SCALE, 0) leftLowerLeg.CFrame = leftUpperLeg.CFrame * CFrame.new(0, -1.2 * NPC_SCALE, 0) leftFoot.CFrame = leftLowerLeg.CFrame * CFrame.new(0, -0.8 * NPC_SCALE, 0) rightUpperLeg.CFrame = lowerTorso.CFrame * CFrame.new(0.5 * NPC_SCALE, -0.5 * NPC_SCALE, 0) rightLowerLeg.CFrame = rightUpperLeg.CFrame * CFrame.new(0, -1.2 * NPC_SCALE, 0) rightFoot.CFrame = rightLowerLeg.CFrame * CFrame.new(0, -0.8 * NPC_SCALE, 0) -- Create all Motor6D joints for proper R15 rig local joints = { {Name = "RootJoint", Part0 = rootPart, Part1 = lowerTorso}, {Name = "Waist", Part0 = lowerTorso, Part1 = upperTorso}, {Name = "Neck", Part0 = upperTorso, Part1 = head}, {Name = "LeftShoulder", Part0 = upperTorso, Part1 = leftUpperArm}, {Name = "LeftElbow", Part0 = leftUpperArm, Part1 = leftLowerArm}, {Name = "LeftWrist", Part0 = leftLowerArm, Part1 = leftHand}, {Name = "RightShoulder", Part0 = upperTorso, Part1 = rightUpperArm}, {Name = "RightElbow", Part0 = rightUpperArm, Part1 = rightLowerArm}, {Name = "RightWrist", Part0 = rightLowerArm, Part1 = rightHand}, {Name = "LeftHip", Part0 = lowerTorso, Part1 = leftUpperLeg}, {Name = "LeftKnee", Part0 = leftUpperLeg, Part1 = leftLowerLeg}, {Name = "LeftAnkle", Part0 = leftLowerLeg, Part1 = leftFoot}, {Name = "RightHip", Part0 = lowerTorso, Part1 = rightUpperLeg}, {Name = "RightKnee", Part0 = rightUpperLeg, Part1 = rightLowerLeg}, {Name = "RightAnkle", Part0 = rightLowerLeg, Part1 = rightFoot} } for _, jointData in ipairs(joints) do local motor = Instance.new("Motor6D") motor.Name = jointData.Name motor.Part0 = jointData.Part0 motor.Part1 = jointData.Part1 motor.C0 = jointData.Part0.CFrame:Inverse() * jointData.Part1.CFrame motor.C1 = CFrame.new() motor.Parent = jointData.Part0 end -- Create Humanoid local humanoid = Instance.new("Humanoid") humanoid.RigType = Enum.HumanoidRigType.R15 humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.Viewer humanoid.HealthDisplayDistance = 0 humanoid.NameDisplayDistance = 100 humanoid.DisplayName = "Betrunkener Waffenhändler" humanoid.WalkSpeed = WALK_SPEED humanoid.MaxHealth = 500 humanoid.Health = 500 humanoid.AutoRotate = true humanoid.Parent = npcModel -- Add beer bottle accessory local bottle = Instance.new("Part") bottle.Name = "BeerBottle" bottle.Size = Vector3.new(0.4 * NPC_SCALE, 1.2 * NPC_SCALE, 0.4 * NPC_SCALE) bottle.BrickColor = BrickColor.new("Dark green") bottle.Material = Enum.Material.Glass bottle.Transparency = 0.3 bottle.Anchored = false bottle.CanCollide = false bottle.Parent = npcModel local bottleMesh = Instance.new("CylinderMesh") bottleMesh.Parent = bottle local bottleWeld = Instance.new("WeldConstraint") bottleWeld.Part0 = rightHand bottleWeld.Part1 = bottle bottleWeld.Parent = bottle bottle.CFrame = rightHand.CFrame * CFrame.Angles(math.rad(45), 0, 0) -- Hat local hat = Instance.new("Part") hat.Name = "Hat" hat.Size = Vector3.new(2.2 * NPC_SCALE, 0.4 * NPC_SCALE, 2.2 * NPC_SCALE) hat.BrickColor = BrickColor.new("Brown") hat.Material = Enum.Material.Fabric hat.Anchored = false hat.CanCollide = false hat.Parent = npcModel local hatWeld = Instance.new("WeldConstraint") hatWeld.Part0 = head hatWeld.Part1 = hat hatWeld.Parent = hat hat.CFrame = head.CFrame * CFrame.new(0, 0.7 * NPC_SCALE, 0) -- Parent to workspace npcModel.Parent = workspace -- Wait for physics wait(0.1) -- Place on ground local ray = workspace:Raycast(rootPart.Position + Vector3.new(0, 10, 0), Vector3.new(0, -1000, 0)) if ray then npcModel:SetPrimaryPartCFrame(CFrame.new(ray.Position + Vector3.new(0, 3, 0))) end return npcModel end -- Enhanced drunk effect local function applyDrunkEffect(npc) local humanoid = npc:FindFirstChild("Humanoid") local rootPart = npc:FindFirstChild("HumanoidRootPart") if not humanoid or not rootPart then return end spawn(function() while npc.Parent and humanoid.Parent do if humanoid.MoveDirection.Magnitude > 0 then -- Drunk swaying local time = tick() local swayX = math.sin(time * 2) * 0.05 local swayZ = math.cos(time * 1.5) * 0.05 humanoid.PlatformStand = false -- Apply slight rotation for drunk effect local cf = rootPart.CFrame rootPart.CFrame = cf * CFrame.Angles(swayX, 0, swayZ) end wait(0.1) end end) end -- Wander with stumbling local function wanderAroundMap(npc) local humanoid = npc:FindFirstChild("Humanoid") if not humanoid then return end spawn(function() wait(2) while npc.Parent and humanoid.Parent do -- Random stumbling movement local randomPos = npc.PrimaryPart.Position + Vector3.new( math.random(-15, 15), 0, math.random(-15, 15) ) -- Occasionally change walk speed for stumbling effect humanoid.WalkSpeed = WALK_SPEED + math.random(-2, 2) humanoid:MoveTo(randomPos) wait(math.random(5, 10)) -- Sometimes stop and "drink" if math.random() < 0.3 then humanoid.WalkSpeed = 0 wait(3) humanoid.WalkSpeed = WALK_SPEED end end end) end -- Talking and interaction system local function setupTalking(npc) local humanoid = npc:FindFirstChild("Humanoid") local head = npc:FindFirstChild("Head") if not humanoid or not head then return end -- Create floating text local billboard = Instance.new("BillboardGui") billboard.Size = UDim2.new(15, 0, 3, 0) billboard.StudsOffset = Vector3.new(0, 4 * NPC_SCALE, 0) billboard.AlwaysOnTop = false billboard.LightInfluence = 0 billboard.Parent = head local textLabel = Instance.new("TextLabel") textLabel.Size = UDim2.new(1, 0, 1, 0) textLabel.BackgroundTransparency = 1 textLabel.TextScaled = true textLabel.TextColor3 = Color3.new(1, 1, 0) textLabel.TextStrokeTransparency = 0 textLabel.TextStrokeColor3 = Color3.new(0, 0, 0) textLabel.Font = Enum.Font.SourceSansBold textLabel.Text = "" textLabel.Parent = billboard -- Interaction icon local iconBillboard = Instance.new("BillboardGui") iconBillboard.Size = UDim2.new(2, 0, 2, 0) iconBillboard.StudsOffset = Vector3.new(0, 6 * NPC_SCALE, 0) iconBillboard.AlwaysOnTop = true iconBillboard.Parent = head local iconLabel = Instance.new("TextLabel") iconLabel.Size = UDim2.new(1, 0, 1, 0) iconLabel.BackgroundTransparency = 1 iconLabel.Text = "💰" iconLabel.TextScaled = true iconLabel.Font = Enum.Font.SourceSansBold iconLabel.Visible = false iconLabel.Parent = iconBillboard -- Player tracking local playersNear = {} local lastPhrase = {} RunService.Heartbeat:Connect(function() for _, player in pairs(Players:GetPlayers()) do if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then local distance = (npc.PrimaryPart.Position - player.Character.HumanoidRootPart.Position).Magnitude if distance < INTERACTION_DISTANCE then iconLabel.Visible = true if not playersNear[player] then playersNear[player] = true openShopRemote:FireClient(player, true) -- Show random phrase local currentTime = tick() if not lastPhrase[player] or currentTime - lastPhrase[player] > 15 then lastPhrase[player] = currentTime textLabel.Text = BavarianPhrases[math.random(#BavarianPhrases)] -- Fade out text after 5 seconds spawn(function() wait(5) for i = 0, 1, 0.1 do textLabel.TextTransparency = i textLabel.TextStrokeTransparency = i wait(0.1) end textLabel.Text = "" textLabel.TextTransparency = 0 textLabel.TextStrokeTransparency = 0 end) end end else if playersNear[player] then playersNear[player] = nil openShopRemote:FireClient(player, false) end end end end -- Hide icon if no players nearby local anyPlayerNear = false for _ in pairs(playersNear) do anyPlayerNear = true break end iconLabel.Visible = anyPlayerNear end) end -- Handle weapon purchases buyWeaponRemote.OnServerEvent:Connect(function(player, weaponName) local leaderstats = player:FindFirstChild("leaderstats") if not leaderstats then leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = player local money = Instance.new("IntValue") money.Name = "Money" money.Value = 5000 -- Starting money money.Parent = leaderstats end local money = leaderstats:FindFirstChild("Money") if money then for _, weapon in pairs(WEAPONS) do if weapon.name == weaponName then if money.Value >= weapon.price then money.Value = money.Value - weapon.price -- Create weapon tool local tool = Instance.new("Tool") tool.Name = weapon.toolName tool.RequiresHandle = true tool.ToolTip = weapon.name .. " (Damage: " .. weapon.damage .. ")" local handle = Instance.new("Part") handle.Name = "Handle" handle.Size = Vector3.new(1, 1, 3) handle.BrickColor = BrickColor.new("Really black") handle.Material = Enum.Material.Metal handle.Parent = tool -- Add mesh for better look local mesh = Instance.new("SpecialMesh") mesh.MeshType = Enum.MeshType.FileMesh mesh.Scale = Vector3.new(0.5, 0.5, 0.5) mesh.Parent = handle tool.Parent = player.Backpack -- Send success feedback purchaseResultRemote:FireClient(player, true, weapon.name) print(player.Name .. " purchased " .. weapon.name) else -- Send failure feedback purchaseResultRemote:FireClient(player, false, "Nicht genug Geld!") print(player.Name .. " - Not enough money for " .. weapon.name) end break end end end end) -- Create dealer wait(2) local dealer = createDrunkDealer() if dealer then applyDrunkEffect(dealer) wanderAroundMap(dealer) setupTalking(dealer) print("Drunk Dealer v3.0 initialized!") end --[[ ==================================================================================== SECTION 2: CLIENT SCRIPT - COPY THIS TO StarterPlayer > StarterPlayerScripts ==================================================================================== ]] -- Drunk Dealer Client Script v3.0 - Modern GUI local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local SoundService = game:GetService("SoundService") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") -- Wait for remotes local remoteFolder = ReplicatedStorage:WaitForChild("DrunkDealerRemotes") local openShopRemote = remoteFolder:WaitForChild("OpenWeaponShop") local buyWeaponRemote = remoteFolder:WaitForChild("BuyWeapon") local purchaseResultRemote = remoteFolder:WaitForChild("PurchaseResult") -- Variables local shopGui = nil local shopFrame = nil local canInteract = false local selectedWeapon = nil -- UI Colors local COLORS = { Background = Color3.fromRGB(20, 20, 20), Primary = Color3.fromRGB(255, 170, 0), Secondary = Color3.fromRGB(40, 40, 40), Success = Color3.fromRGB(0, 255, 0), Error = Color3.fromRGB(255, 0, 0), Text = Color3.fromRGB(255, 255, 255), TextDark = Color3.fromRGB(200, 200, 200) } -- Create modern shop GUI local function createShopGUI() shopGui = Instance.new("ScreenGui") shopGui.Name = "WeaponShopGUI" shopGui.ResetOnSpawn = false shopGui.Enabled = false shopGui.Parent = playerGui -- Dark overlay local overlay = Instance.new("Frame") overlay.Name = "Overlay" overlay.Size = UDim2.new(1, 0, 1, 0) overlay.BackgroundColor3 = Color3.new(0, 0, 0) overlay.BackgroundTransparency = 0.3 overlay.Parent = shopGui -- Main container local container = Instance.new("Frame") container.Name = "Container" container.Size = UDim2.new(0.7, 0, 0.8, 0) container.Position = UDim2.new(0.15, 0, 0.1, 0) container.BackgroundColor3 = COLORS.Background container.BorderSizePixel = 0 container.Parent = shopGui local containerCorner = Instance.new("UICorner") containerCorner.CornerRadius = UDim.new(0, 20) containerCorner.Parent = container -- Header local header = Instance.new("Frame") header.Name = "Header" header.Size = UDim2.new(1, 0, 0.15, 0) header.BackgroundColor3 = COLORS.Secondary header.BorderSizePixel = 0 header.Parent = container local headerCorner = Instance.new("UICorner") headerCorner.CornerRadius = UDim.new(0, 20) headerCorner.Parent = header local headerBottom = Instance.new("Frame") headerBottom.Size = UDim2.new(1, 0, 0.5, 0) headerBottom.Position = UDim2.new(0, 0, 0.5, 0) headerBottom.BackgroundColor3 = COLORS.Secondary headerBottom.BorderSizePixel = 0 headerBottom.Parent = header -- Title local title = Instance.new("TextLabel") title.Name = "Title" title.Size = UDim2.new(0.7, 0, 0.5, 0) title.Position = UDim2.new(0.05, 0, 0.25, 0) title.BackgroundTransparency = 1 title.Text = "🍺 BESOFFENER WAFFENHÄNDLER 🍺" title.TextColor3 = COLORS.Primary title.TextScaled = true title.Font = Enum.Font.SourceSansBold title.Parent = header local subtitle = Instance.new("TextLabel") subtitle.Name = "Subtitle" subtitle.Size = UDim2.new(0.7, 0, 0.3, 0) subtitle.Position = UDim2.new(0.05, 0, 0.6, 0) subtitle.BackgroundTransparency = 1 subtitle.Text = "Die besten Waffen in ganz Bayern!" subtitle.TextColor3 = COLORS.TextDark subtitle.TextScaled = true subtitle.Font = Enum.Font.SourceSans subtitle.Parent = header -- Money display local moneyFrame = Instance.new("Frame") moneyFrame.Name = "MoneyFrame" moneyFrame.Size = UDim2.new(0.2, 0, 0.6, 0) moneyFrame.Position = UDim2.new(0.75, 0, 0.2, 0) moneyFrame.BackgroundColor3 = COLORS.Primary moneyFrame.BorderSizePixel = 0 moneyFrame.Parent = header local moneyCorner = Instance.new("UICorner") moneyCorner.CornerRadius = UDim.new(0, 10) moneyCorner.Parent = moneyFrame local moneyLabel = Instance.new("TextLabel") moneyLabel.Name = "MoneyLabel" moneyLabel.Size = UDim2.new(1, 0, 1, 0) moneyLabel.BackgroundTransparency = 1 moneyLabel.Text = "$0" moneyLabel.TextColor3 = COLORS.Background moneyLabel.TextScaled = true moneyLabel.Font = Enum.Font.SourceSansBold moneyLabel.Parent = moneyFrame -- Update money display spawn(function() while shopGui.Parent do local leaderstats = player:FindFirstChild("leaderstats") if leaderstats and leaderstats:FindFirstChild("Money") then moneyLabel.Text = "$" .. leaderstats.Money.Value end wait(0.1) end end) -- Content area local content = Instance.new("ScrollingFrame") content.Name = "Content" content.Size = UDim2.new(0.9, 0, 0.7, 0) content.Position = UDim2.new(0.05, 0, 0.2, 0) content.BackgroundTransparency = 1 content.ScrollBarThickness = 10 content.ScrollBarImageColor3 = COLORS.Primary content.Parent = container local contentLayout = Instance.new("UIListLayout") contentLayout.SortOrder = Enum.SortOrder.LayoutOrder contentLayout.Padding = UDim.new(0, 15) contentLayout.Parent = content -- Weapons local weapons = { {name = "Pistole", price = 100, desc = "Klein aber fein", icon = "🔫"}, {name = "Schrotflinte", price = 500, desc = "Für die groben Sachen", icon = "🔫"}, {name = "Maschinenpistole", price = 1000, desc = "Schnell und tödlich", icon = "🔫"}, {name = "Scharfschützengewehr", price = 2500, desc = "Präzision auf Distanz", icon = "🎯"}, {name = "Raketenwerfer", price = 5000, desc = "BOOM! Mehr muss ma ned sagen", icon = "🚀"} } for i, weapon in ipairs(weapons) do local weaponCard = Instance.new("Frame") weaponCard.Name = weapon.name weaponCard.Size = UDim2.new(1, 0, 0, 120) weaponCard.BackgroundColor3 = COLORS.Secondary weaponCard.BorderSizePixel = 0 weaponCard.Parent = content local cardCorner = Instance.new("UICorner") cardCorner.CornerRadius = UDim.new(0, 15) cardCorner.Parent = weaponCard -- Weapon icon local iconLabel = Instance.new("TextLabel") iconLabel.Size = UDim2.new(0.15, 0, 0.8, 0) iconLabel.Position = UDim2.new(0.02, 0, 0.1, 0) iconLabel.BackgroundTransparency = 1 iconLabel.Text = weapon.icon iconLabel.TextScaled = true iconLabel.Font = Enum.Font.SourceSansBold iconLabel.Parent = weaponCard -- Weapon info local nameLabel = Instance.new("TextLabel") nameLabel.Size = UDim2.new(0.5, 0, 0.4, 0) nameLabel.Position = UDim2.new(0.2, 0, 0.1, 0) nameLabel.BackgroundTransparency = 1 nameLabel.Text = weapon.name nameLabel.TextColor3 = COLORS.Text nameLabel.TextScaled = true nameLabel.Font = Enum.Font.SourceSansBold nameLabel.TextXAlignment = Enum.TextXAlignment.Left nameLabel.Parent = weaponCard local descLabel = Instance.new("TextLabel") descLabel.Size = UDim2.new(0.5, 0, 0.3, 0) descLabel.Position = UDim2.new(0.2, 0, 0.5, 0) descLabel.BackgroundTransparency = 1 descLabel.Text = weapon.desc descLabel.TextColor3 = COLORS.TextDark descLabel.TextScaled = true descLabel.Font = Enum.Font.SourceSans descLabel.TextXAlignment = Enum.TextXAlignment.Left descLabel.Parent = weaponCard -- Price local priceFrame = Instance.new("Frame") priceFrame.Size = UDim2.new(0.15, 0, 0.4, 0) priceFrame.Position = UDim2.new(0.65, 0, 0.3, 0) priceFrame.BackgroundColor3 = COLORS.Primary priceFrame.BorderSizePixel = 0 priceFrame.Parent = weaponCard local priceCorner = Instance.new("UICorner") priceCorner.CornerRadius = UDim.new(0, 10) priceCorner.Parent = priceFrame local priceLabel = Instance.new("TextLabel") priceLabel.Size = UDim2.new(1, 0, 1, 0) priceLabel.BackgroundTransparency = 1 priceLabel.Text = "$" .. weapon.price priceLabel.TextColor3 = COLORS.Background priceLabel.TextScaled = true priceLabel.Font = Enum.Font.SourceSansBold priceLabel.Parent = priceFrame -- Buy button local buyButton = Instance.new("TextButton") buyButton.Size = UDim2.new(0.12, 0, 0.6, 0) buyButton.Position = UDim2.new(0.85, 0, 0.2, 0) buyButton.BackgroundColor3 = COLORS.Success buyButton.BorderSizePixel = 0 buyButton.Text = "KAUFEN" buyButton.TextColor3 = COLORS.Text buyButton.TextScaled = true buyButton.Font = Enum.Font.SourceSansBold buyButton.Parent = weaponCard local buyCorner = Instance.new("UICorner") buyCorner.CornerRadius = UDim.new(0, 10) buyCorner.Parent = buyButton -- Hover effects weaponCard.MouseEnter:Connect(function() TweenService:Create(weaponCard, TweenInfo.new(0.2), { BackgroundColor3 = Color3.fromRGB(60, 60, 60) }):Play() end) weaponCard.MouseLeave:Connect(function() TweenService:Create(weaponCard, TweenInfo.new(0.2), { BackgroundColor3 = COLORS.Secondary }):Play() end) buyButton.MouseEnter:Connect(function() TweenService:Create(buyButton, TweenInfo.new(0.1), { Size = UDim2.new(0.13, 0, 0.65, 0) }):Play() end) buyButton.MouseLeave:Connect(function() TweenService:Create(buyButton, TweenInfo.new(0.1), { Size = UDim2.new(0.12, 0, 0.6, 0) }):Play() end) -- Buy functionality buyButton.MouseButton1Click:Connect(function() selectedWeapon = weapon.name buyWeaponRemote:FireServer(weapon.name) -- Button animation buyButton.BackgroundColor3 = COLORS.Primary buyButton.Text = "..." wait(0.5) buyButton.BackgroundColor3 = COLORS.Success buyButton.Text = "KAUFEN" end) end -- Update content size contentLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function() content.CanvasSize = UDim2.new(0, 0, 0, contentLayout.AbsoluteContentSize.Y) end) -- Close button local closeButton = Instance.new("TextButton") closeButton.Name = "CloseButton" closeButton.Size = UDim2.new(0.05, 0, 0.05, 0) closeButton.Position = UDim2.new(0.93, 0, 0.02, 0) closeButton.BackgroundColor3 = COLORS.Error closeButton.BorderSizePixel = 0 closeButton.Text = "✖" closeButton.TextColor3 = COLORS.Text closeButton.TextScaled = true closeButton.Font = Enum.Font.SourceSansBold closeButton.Parent = container local closeCorner = Instance.new("UICorner") closeCorner.CornerRadius = UDim.new(1, 0) closeCorner.Parent = closeButton closeButton.MouseButton1Click:Connect(function() if shopGui.Enabled then -- Close animation TweenService:Create(container, TweenInfo.new(0.3, Enum.EasingStyle.Back), { Size = UDim2.new(0, 0, 0, 0), Position = UDim2.new(0.5, 0, 0.5, 0) }):Play() TweenService:Create(overlay, TweenInfo.new(0.3), { BackgroundTransparency = 1 }):Play() wait(0.3) shopGui.Enabled = false end end) shopFrame = container end -- Notification system local function showNotification(text, isSuccess) local notif = Instance.new("Frame") notif.Size = UDim2.new(0.3, 0, 0.08, 0) notif.Position = UDim2.new(0.35, 0, 1.1, 0) notif.BackgroundColor3 = isSuccess and COLORS.Success or COLORS.Error notif.BorderSizePixel = 0 notif.Parent = shopGui local notifCorner = Instance.new("UICorner") notifCorner.CornerRadius = UDim.new(0, 10) notifCorner.Parent = notif local notifText = Instance.new("TextLabel") notifText.Size = UDim2.new(1, 0, 1, 0) notifText.BackgroundTransparency = 1 notifText.Text = text notifText.TextColor3 = COLORS.Text notifText.TextScaled = true notifText.Font = Enum.Font.SourceSansBold notifText.Parent = notif -- Slide in TweenService:Create(notif, TweenInfo.new(0.5, Enum.EasingStyle.Back), { Position = UDim2.new(0.35, 0, 0.9, 0) }):Play() wait(2) -- Slide out TweenService:Create(notif, TweenInfo.new(0.5, Enum.EasingStyle.Back), { Position = UDim2.new(0.35, 0, 1.1, 0) }):Play() wait(0.5) notif:Destroy() end -- Interaction hint local hintGui = Instance.new("ScreenGui") hintGui.Name = "InteractionHint" hintGui.ResetOnSpawn = false hintGui.Parent = playerGui local hintFrame = Instance.new("Frame") hintFrame.Size = UDim2.new(0.25, 0, 0.06, 0) hintFrame.Position = UDim2.new(0.375, 0, 0.85, 0) hintFrame.BackgroundColor3 = COLORS.Background hintFrame.BorderSizePixel = 0 hintFrame.Visible = false hintFrame.Parent = hintGui local hintCorner = Instance.new("UICorner") hintCorner.CornerRadius = UDim.new(0, 10) hintCorner.Parent = hintFrame local hintText = Instance.new("TextLabel") hintText.Size = UDim2.new(1, 0, 1, 0) hintText.BackgroundTransparency = 1 hintText.Text = "Drücke [F] zum Interagieren" hintText.TextColor3 = COLORS.Primary hintText.TextScaled = true hintText.Font = Enum.Font.SourceSansBold hintText.Parent = hintFrame -- Key animation spawn(function() while true do if hintFrame.Visible then TweenService:Create(hintFrame, TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), { Position = UDim2.new(0.375, 0, 0.83, 0) }):Play() wait(0.5) TweenService:Create(hintFrame, TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), { Position = UDim2.new(0.375, 0, 0.85, 0) }):Play() wait(0.5) else wait(1) end end end) -- Input handling UserInputService.InputBegan:Connect(function(input, processed) if processed then return end if input.KeyCode == Enum.KeyCode.F and canInteract then if shopGui and not shopGui.Enabled then shopGui.Enabled = true -- Open animation shopFrame.Size = UDim2.new(0, 0, 0, 0) shopFrame.Position = UDim2.new(0.5, 0, 0.5, 0) TweenService:Create(shopFrame, TweenInfo.new(0.5, Enum.EasingStyle.Back), { Size = UDim2.new(0.7, 0, 0.8, 0), Position = UDim2.new(0.15, 0, 0.1, 0) }):Play() local overlay = shopGui:FindFirstChild("Overlay") if overlay then overlay.BackgroundTransparency = 1 TweenService:Create(overlay, TweenInfo.new(0.3), { BackgroundTransparency = 0.3 }):Play() end elseif shopGui and shopGui.Enabled then -- Use close button logic local closeButton = shopFrame:FindFirstChild("CloseButton") if closeButton then closeButton.MouseButton1Click:Fire() end end end end) -- Remote events openShopRemote.OnClientEvent:Connect(function(isNear) canInteract = isNear hintFrame.Visible = isNear if not isNear and shopGui and shopGui.Enabled then local closeButton = shopFrame:FindFirstChild("CloseButton") if closeButton then closeButton.MouseButton1Click:Fire() end end end) purchaseResultRemote.OnClientEvent:Connect(function(success, message) if shopGui and shopGui.Enabled then showNotification( success and (selectedWeapon .. " gekauft!") or message, success ) end end) -- Initialize createShopGUI() print("Drunk Dealer Client v3.0 ready!")